我試圖部署在JRuby與米娜的應用程序,但一個寶石不安裝,實際上它不應該被安裝在首位...安裝JRuby的寶石,米娜
創業板unf_ext
這是一個機械化依賴。如果我SSH連接到服務器並嘗試安裝Mechanize
,則安裝時沒有問題,因此只安裝unf
,而不是安裝unf_ext
。
錯誤:
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.
我的Gemfile:https://gist.github.com/davidhq/09d84bc79683b9d3332e
那麼如何使在通過米娜運行捆綁安裝一切很好?
其實機械寶石取決於'unf_ext' ...但是當安裝在JRuby上時,它不應該需要......我想我不應該把'Mechanize'移動到'platform :: jruby',因爲它對兩者都有效,只有不同的依賴關係。 – davidhq
我明白了......上面的答案。 – davidhq