[rspec-devel] RSpec inside JRuby

David Chelimsky dchelimsky at gmail.com
Wed May 23 12:59:34 EDT 2007


On 5/23/07, Nick Sieger <nicksieger at gmail.com> wrote:
> On 5/23/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > I get the following error executing this line.
> >
> > Error opening script file:
> > /Users/david/projects/ruby/jruby/trunk/jruby/bin/rake (No such file or
> > directory)
> >
> > So I tried
> >
> >   which rake
> >   => /opt/local/bin/rake
> >
> > Then this:
> >
> > $ jruby -S /opt/local/bin/rake checkout_code
> > Error opening script file:
> > /Users/david/projects/ruby/jruby/trunk/jruby/bin/opt/local/bin/rake
> > (No such file or directory)
> >
> > I was able to get it to work w/ just:
> >
> >   rake checkout_code
> >
> > But then I did this:
> >
> > $ jruby bin/spec spec -c
> > /Users/david/projects/ruby/jruby/trunk/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in
> > `require': no such file to load -- hpricot (LoadError)
> > $ gem list hpricot
> >
>
> Yeah, we don't yet have Rake in the JRuby repository, and we may not
> do it (e.g., it may be a build-time thing to install Rails, rather
> than checking in source).  For now, you can simply do
>
> jruby -S gem install rake
>
> And then everything should work from there.  Note that JRuby needs its
> own version of hpricot that's not on Rubyforge yet, so the
> :checkout_code target in the testsuites/rspec Rakefile does this for
> you.

Thanks Nick - I got this working now w/ the following steps:

svn co http://svn.codehaus.org/jruby/trunk jruby
cd jruby/jruby
ant clean
ant
# put JRuby's bin dir on your PATH
jruby -S gem install rake --no-ri --no-rdoc
jruby -S gem install diff-lcs
cd ../testsuites/rspec
mkdir target
jruby -S rake checkout_code
cd target/rspec
jruby bin/spec spec -c


>
> /Nick
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list