我找不到能够回答此问题的SO QA。
我通过安装了JRuby rvm install jruby
,然后生成了一个新的Rails应用程序。为了允许通过rvm自动更改红宝石版本,我发现Bundler允许您添加:
ruby '1.9.3', engine: 'jruby', engine_version: '1.7.12'
请参阅此处以供参考。由于版本号为1.3,因此我在根应用目录下检查了Bundler版本:
$ bundle -v
Bundler version 1.6.2
我假设我具有此功能。现在,当我继续将其添加到Gemfile时:
source 'https://rubygems.org'
ruby '1.9.3', engine: 'jruby', engine_version: '1.7.12'
gem 'rails', '4.1.1'
gem 'activerecord-jdbcsqlite3-adapter'
然后运行后,cd .. && cd app
我收到此问题:
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /Users/benmorgan/Sites/sigma/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
Unknown ruby string (do not know how to handle): ruby-1.9.3,engine:jruby,engine_version:1.7.12.
您知道如何告诉rvm选择jruby版本吗?Gemfile中是否可能?
正如评论所建议的那样,已经链接到RVM报告Gemfile ruby未安装
RVM对从Gemfile解析Ruby“引擎”的支持有限,并且与Heroku使用(解析)指令的方式不匹配。
如果您真的想同时在Gemfile中使用它,请为RVM使用注释,例如
source "https://rubygems.org"
#ruby=jruby-1.7.12
if ENV["JRUBY"] || RUBY_PLATFORM == "java"
ruby "1.9.3", engine: "jruby", engine_version: "1.7.12"
end
gem "rails", "~> 4.1.1"
# ...
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句