小编Gra*_*ley的帖子

在Heroku上使用jRuby cext构建宝石

我正在尝试使用JRuby Heroku buildpack(https://github.com/jruby/heroku-buildpack-jruby)来运行一个简单的测试应用程序.

但是,似乎无法编译带有C扩展名的gem.例如,在执行"git push heroku"时,没有C扩展的gem已成功安装,但随后......

   Using activerecord (3.1.3) 
   Using activeresource (3.1.3) 
   Using bouncy-castle-java (1.5.0146.1) 
   Using bson (1.7.0) 
   Installing bson_ext (1.7.0) with native extensions 
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

           /tmp/build_10vcxrs9ayvxf/jruby/bin/jruby extconf.rb 
   NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable.

      (root) at /tmp/build_10vcxrs9ayvxf/jruby/lib/ruby/shared/mkmf.rb:8
     require at org/jruby/RubyKernel.java:1019
      (root) at /tmp/build_10vcxrs9ayvxf/jruby/lib/ruby/shared/rubygems/custom_require.rb:1
      (root) at extconf.rb:1


   Gem files will remain installed in /tmp/build_10vcxrs9ayvxf/vendor/bundle/jruby/1.9/gems/bson_ext-1.7.0 for inspection.
   Results logged to /tmp/build_10vcxrs9ayvxf/vendor/bundle/jruby/1.9/gems/bson_ext-1.7.0/ext/cbson/gem_make.out
   An error …
Run Code Online (Sandbox Code Playgroud)

jruby heroku buildpack

5
推荐指数
1
解决办法
727
查看次数

标签 统计

buildpack ×1

heroku ×1

jruby ×1