Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing gems on JRuby #211

Closed
davidhq opened this issue Jul 24, 2014 · 1 comment
Closed

Installing gems on JRuby #211

davidhq opened this issue Jul 24, 2014 · 1 comment

Comments

@davidhq
Copy link

davidhq commented Jul 24, 2014

I'm trying to deploy an app on JRuby with Mina, but one gem doesn't install and actually it shouldn't be installed in the first place...

The gem is unf_ext and it is a Mechanize dependency. If I SSH to the server and try to install Mechanize, it installs without problems and only unf installs as a result, not unf_ext.

Error:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

       /home/linkrecover/.rbenv/versions/jruby-1.7.13/bin/jruby extconf.rb  
   NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS. 

      (root) at /home/linkrecover/.rbenv/versions/jruby-1.7.13/lib/ruby/shared/mkmf.rb:8 
     require at org/jruby/RubyKernel.java:1065 
      (root) at /home/linkrecover/.rbenv/versions/jruby-1.7.13/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1 
      (root) at extconf.rb:1 


   Gem files will remain installed in /var/www/lr/tmp/build-14062262733806/vendor/bundle/jruby/1.9/gems/unf_ext-0.0.6 for inspection. 
   Results logged to /var/www/lr/tmp/build-14062262733806/vendor/bundle/jruby/1.9/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out 
   An error occurred while installing unf_ext (0.0.6), and Bundler cannot continue. 
   Make sure that `gem install unf_ext -v '0.0.6'` succeeds before bundling. 

My Gemfile: https://gist.github.com/davidhq/09d84bc79683b9d3332e

So how to make bundler install everything nicely when run through Mina? It's possible that this is a bundler issue... How could I test it? E.g. try to install gems for the app in question manually to where mina is trying to install them - shared/bundle/jruby/1.9/gems?

@d4be4st
Copy link
Member

d4be4st commented Jul 5, 2015

probably your env variables are not set up properly.

related issue: #311

@d4be4st d4be4st closed this as completed Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants