[rspec-devel] RSpec inside JRuby

Nick Sieger nicksieger at gmail.com
Wed May 23 12:57:54 EDT 2007

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


More information about the rspec-devel mailing list