activeadmin / inherited_resources

MIT License
2.7k stars 392 forks source link

'bundle install' fails on JRuby #92

Closed jfirebaugh closed 13 years ago

jfirebaugh commented 13 years ago
Installing linecache (0.43) with native extensions /Users/jfire/.rvm/rubies/jruby-1.5.5/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

Due to 'ruby-debug' gem not being installable on JRuby. Removing the gem "ruby-debug" line makes bundle install work.

josevalim commented 13 years ago

A patch wrapping gem "ruby-debug" under platform :ruby is welcome. :)

jfirebaugh commented 13 years ago

:)

https://github.com/bigfix/inherited_resources/commit/923be7ce61f6d520610d159b595ea3cf2f43e498

jfirebaugh commented 13 years ago

Unfortunately I couldn't get much further due to a JRuby bug: http://jira.codehaus.org/browse/JRUBY-5183

jfirebaugh commented 13 years ago

Hmm, :platforms => : ruby_18 does apparently not work how I would expect or is buggy. It still tries to install ruby-debug dependencies on 1.9.2.

jfirebaugh commented 13 years ago

Ah, bundler 1.0.0 bug. It works with 1.0.3.

BanzaiMan commented 13 years ago

Optionally, you might specify:

gem "ruby-debug", "0.10.3", :platform => :jruby
gem "ruby-debug", :platform => :ruby

instead, until ruby-debug-base 0.10.4 is released for JRuby.

jfirebaugh commented 13 years ago

Unless I'm missing something, ruby-debug is not installable on JRuby at any version:

$ gem install ruby-debug -v 0.10.3
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug:
    ERROR: Failed to build gem native extension.

/Users/jfire/.rvm/rubies/jruby-1.5.5/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library.
         Check http://kenai.com/projects/jruby/pages/Home for alternatives.
extconf.rb:16: undefined method `create_makefile' for main:Object (NoMethodError)
BanzaiMan commented 13 years ago

John,

You're somehow missing ruby-debug from your RVM installation of JRuby.

Not sure why RVM didn't do that, but you can follow the instructions in http://debug-commons.rubyforge.org/ to fix that.

jwilkins commented 13 years ago

More details from http://debug-commons.rubyforge.org/ Installation (j)ruby-debug-base is available as a Ruby gem. Unfortunately it is still not installable remotely. But installation is easy enough:

manually download the ruby-debug-base-0.10.3.1-java.gem to your local directory (grab from http://rubyforge.org/frs/?group_id=3085) install the Gem into your JRuby Gem repository: jruby -S gem install ruby-debug-base-0.10.3.1-java.gem now install ruby-debug with: jruby -S gem install --ignore-dependencies ruby-debug