Forum: RSpec RSpec 1.1.9 on JRuby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ashley Moran (Guest)
on 2008-10-23 14:45
(Received via mailing list)
Hi

Can you use RSpec 1.1.9 on JRuby?  Now it depends on spicycode-rcov, I
can't install it:

# jgem install rspec --development
Building native extensions.  This could take a while...
ERROR:  Error installing rspec:
  ERROR: Failed to build gem native extension.

/opt/local/share/java/jruby/bin/jruby extconf.rb install rspec --
development


Gem files will remain installed in /opt/local/share/java/jruby/lib/
ruby/gems/1.8/gems/spicycode-rcov-0.8.1.3.0 for inspection.
Results logged to /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/
spicycode-rcov-0.8.1.3.0/ext/rcovrt/gem_make.out

Thanks
Ashley

--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
David Chelimsky (Guest)
on 2008-10-23 16:01
(Received via mailing list)
On Thu, Oct 23, 2008 at 7:43 AM, Ashley Moran
<ashley.moran@patchspace.co.uk> wrote:
> /opt/local/share/java/jruby/bin/jruby extconf.rb install rspec --development
>
>
> Gem files will remain installed in
> /opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/spicycode-rcov-0.8.1.3.0
> for inspection.
> Results logged to
> 
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/spicycode-rcov-0.8.1.3.0/ext/rcovrt/gem_make.out

For rspec-1.1.9 you have to be on rubygems 1.3 to avoid those
dependencies (as they are developer deps and I just used hoe to create
the gemspec, which makes them normal deps for rubygems <= 1.2).

I'll make sure that dep is not there for the next rspec release, but
in the mean time, upgrading to rubygems 1.3 and reinstalling rspec
will solve your problem. That assumes that there is a jgem-1.3. If
not, you can probably do this:

git clone git://github.com/dchelimsky/rspec.git
git co 1.1.9

Then modify rspec.gemspec to eliminate the dependency and build the gem
locally:

jgem build rspec.gemspec
jgem install pkg/rspec-1.1.9.gem

HTH,
David
Ashley Moran (Guest)
on 2008-10-23 22:43
(Received via mailing list)
On Oct 23, 2008, at 2:58 pm, David Chelimsky wrote:

> git co 1.1.9
>
> Then modify rspec.gemspec to eliminate the dependency and build the
> gem locally:
>
> jgem build rspec.gemspec
> jgem install pkg/rspec-1.1.9.gem
>
> HTH,
> David


Hi David

Thanks for the explanation.  I can live with 1.1.8 in the meantime: I
only need it for Cucumber+Celerity, so I won't be doing anything
complex in JRuby.  I assume the next JRuby release will include
RubyGems 1.3.

Cheers
Ashley


--
http://www.patchspace.co.uk/
http://aviewfromafar.net/
This topic is locked and can not be replied to.