[rspec-devel] RSpec inside JRuby

David Chelimsky dchelimsky at gmail.com
Wed May 23 12:47:01 EDT 2007


On 5/23/07, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> On 5/23/07, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> > On 5/23/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > > On 5/23/07, Nick Sieger <nicksieger at gmail.com> wrote:
> > > > On 5/23/07, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> > > > > Hi all,
> > > > >
> > > > > The fine JRuby team declared at RailsConf that they will bundle RSpec
> > > > > with JRuby when it ships. That's awesome, thanks again guys.
> > > > >
> > > > > I hope this can be the RSpec 1.0.1 version (not yet released) - it has
> > > > > some minor tweaks that are needed to get all of RSpec's specs to run
> > > > > on JRuby. (This is something Ola Bini and I paired on at RailsConf).
> > > > > We'll release 1.0.1 if the JRuby team ask us for it.
> > > > >
> > > > > I am currently able to run *all* of RSpec core's specs on JRuby (HEAD).
> > > > >
> > > > > LET'S KEEP IT THAT WAY.
> > > > >
> > > > > I'm asking that all RSpec developers make sure RSpec always runs
> > > > > against JRuby until they ship 1.0. Here is how:
> > > > >
> > > > > svn co http://svn.codehaus.org/jruby jruby
> >
> > This should be:
> >
> > svn co http://svn.codehaus.org/jruby/trunk jruby
> >
> > > > > cd jruby/jruby
> > > > > ant clean
> > > > > ant
> > > > > # put JRuby's bin dir on your PATH
> > > > > cd ../testsuites/rspec
> > > > > mkdir target
> > > > > jruby -S rake checkout_code
> > >
> > > 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)
> > >
> >
> > Something went wrong in your checkout it seems. Or your PATH is wrong.
> > Try the corrected line above. Do a which jruby to see where jruby is.
> > This dir should be the one you checked out, and it should have rake,
> > gem etc. If not your PATH is wrong.
> >
> > > So I tried
> > >
> > >   which rake
> > >   => /opt/local/bin/rake
> > >
> > > Then this:
> > >
> > > $ jruby -S /opt/local/bin/rake checkout_code
> >
>
> DOH
>
> It's because rake is not installed!
>
> jruby -S gem install rake --no-ri --no-rdoc

God dammit - I just blew away the install :)

I didn't understand that jruby needs all its own gems. I'll report
back when this is working.



>
> > If jruby -S rake doesn't work, nothing will work.
> >
> > > 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
> > >
> >
> > That won't work, because it will install the hpricot gem in ruby, not jruby
> >
> > > 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
> > >
> >
> > Again, "gem" will run ruby, not jruby. All your problems have the same
> > reason - you don't have the appropriate bin files.
> >
> > > *** LOCAL GEMS ***
> > >
> > > hpricot (0.5)
> > >     a swift, liberal HTML parser with a fantastic library
> > >
> > > So it looks like jruby is not able to see my existing path. Suggestions?
> > >
> > >
> > > > > cd target/rspec
> > > > > jruby bin/spec spec -c
> > > > >
> > > > > I'm getting a bunch of hpricot warnings but otherwise it's 100%
> > > > > green!!!!!!!!!!!:
> > > > >
> > > > >  gems/hpricot-0.5.140-jruby/lib/hpricot/parse.rb:15 warning: multiple
> > > > > values for a block parameter (4 for 1)
> > > >
> > > > This is also in CI: http://jruby.thresher.com/browse/RSPEC-TRUNK
> > > >
> > > > Although since RSpec checkout is part of the build, it won't get run
> > > > when RSpec code changes at the moment.
> > > >
> > > > Right now there are 5 failures which come and go, it seems like we
> > > > (JRuby) have some randomly recurring issue with Object#inspect or
> > > > something like that, because the actual output only differs by #<...>.
> > > >  One of us will have to look at it.
> > > >
> > > > /Nick
> > > > _______________________________________________
> > > > rspec-devel mailing list
> > > > rspec-devel at rubyforge.org
> > > > http://rubyforge.org/mailman/listinfo/rspec-devel
> > > >
> > > _______________________________________________
> > > rspec-devel mailing list
> > > rspec-devel at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/rspec-devel
> > >
> >
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list