0

Rails アプリを Windows (RVM) で作成し、それらを Linux (jRuby) にデプロイする際に、互換性のない gem 要件に悩まされています。アプリをバンドルして実行できるように、Linux/jRuby 側で Rails 要件を再構成するにはどうすればよいですか?

debug_inspectorは RVM にのみ存在するため、gem 要件は jRuby にバンドルされません。代わりに、バンドラーは不平を言います:

debug_inspector 0.0.2 の使用

Gem::Ext::BuildError: エラー: gem ネイティブ拡張のビルドに失敗しました。

[...]/jruby-1.7.20/bin/jruby -r ./siteconf20150523-28378-1i9zw09.rb extconf.rb

[...]/jruby-1.7.20/lib/ruby/shared/mkmf.rb:14: 古い非推奨の Config の代わりに RbConfig を使用します。mkmf.rb は [...]/jruby-1.7.20/lib/native/include/ruby/ruby.h で ruby​​ のヘッダー ファイルを見つけることができません

extconf が失敗しました。シグナル 1 をキャッチできませんでした

ありがとう

#diff Gemfile.lock_rvm Gemfile.lock_jruby
2c2
<   remote: http://rubygems.org/
---
>   remote: https://rubygems.org/
32a33,37
>     activerecord-jdbc-adapter (1.3.16)
>       activerecord (>= 2.2)
>     activerecord-jdbcsqlite3-adapter (1.3.16)
>       activerecord-jdbc-adapter (~> 1.3.16)
>       jdbc-sqlite3 (>= 3.7.2, < 3.9)
40,41d44
<     binding_of_caller (0.7.2)
<       debug_inspector (>= 0.0.1)
43,44d45
<     byebug (5.0.0)
<       columnize (= 0.9.0)
52,53d52
<     columnize (0.9.0)
<     debug_inspector (0.0.2)
59c58
<     jbuilder (2.2.16)
---
>     jbuilder (2.2.13)
61a61
>     jdbc-sqlite3 (3.8.7)
66c66
<     json (1.8.2)
---
>     json (1.8.2-java)
72d71
<     mini_portile (0.6.2)
75,76c74,76
<     nokogiri (1.6.6.2-x86-mingw32)
<       mini_portile (~> 0.6.0)
---
>     nokogiri (1.6.6.2-java)
>     puma (2.11.2-java)
>       rack (>= 1.1, < 2.0)
107c107
<     sass (3.4.14)
---
>     sass (3.4.13)
119c119
<     sprockets-rails (2.3.1)
---
>     sprockets-rails (2.3.0)
123c123,125
<     sqlite3 (1.3.10-x86-mingw32)
---
>     therubyrhino (2.0.4)
>       therubyrhino_jar (>= 1.7.3)
>     therubyrhino_jar (1.7.6)
125c127
<     thread_safe (0.3.5)
---
>     thread_safe (0.3.5-java)
136,140d137
<     web-console (2.1.2)
<       activemodel (>= 4.0)
<       binding_of_caller (>= 0.7.2)
<       railties (>= 4.0)
<       sprockets-rails (>= 2.0, < 4.0)
143c140
<   x86-mingw32
---
>   java
146c143
<   byebug
---
>   activerecord-jdbcsqlite3-adapter
149a147
>   puma
153c151
<   sqlite3
---
>   therubyrhino
157d154
<   web-console (~> 2.0)
4

1 に答える 1

3

platformsGemfile でオプションを使用します。

gem "ruby-debug", :platforms => :mri_18

http://bundler.io/v1.3/man/gemfile.5.html

于 2015-05-23T14:36:19.057 に答える