简体   繁体   English

缺少Rails宝石。 请`gem install -v = 2.3.4 rails`

[英]Missing the Rails gem. Please `gem install -v=2.3.4 rails`

I was trying to fix this error and I ended up with a new one. 我试图解决此错误 ,但最终遇到了一个新错误

I have installed ruby 1.8.6, but using Built-in JRuby 1.4.0 for my app. 我已经安装了ruby 1.8.6,但是对我的应用程序使用了内置JRuby 1.4.0。

Everything was working fine until I updated every gem(as specified by the answer I got from that link) and everything crashed: ever since I tried to start the app I received the following error message: 一切正常,直到我更新了每一个gem(从该链接获得的答案所指定),并且一切都崩溃了:自从尝试启动应用程序以来,我收到以下错误消息:

Missing the Rails 2.3.4 gem. 缺少Rails 2.3.4宝石。 Please gem install -v=2.3.4 rails , update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. gem install -v=2.3.4 rails ,在config / environment.rb中为您已安装的Rails版本更新RAILS_GEM_VERSION设置,或注释掉RAILS_GEM_VERSION以使用已安装的最新版本。

Then, I tried to uninstall the updates(to v2.3.8, most of them), so the last version is 2.3.4. 然后,我尝试卸载更新(到v2.3.8,大多数),因此最新版本为2.3.4。

In my config/environment.rb file I have this: 在我的config / environment.rb文件中,我有以下内容:

RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION

so I guess everything is as I left it before the update. 所以我猜一切都和更新前一样。

The question is....why do I keep getting the error and I can't start the app? 问题是...。为什么我不断收到错误消息,但无法启动应用程序?

Well, I got this working by changing the gem path for my Built-in Jruby 1.4.0 platform, pointing to the gems' directory of Ruby, instead of NetBeans(as it was before). 好吧,我通过更改内置Jruby 1.4.0平台的gem路径来工作,它指向gem的Ruby目录,而不是以前的NetBeans。

I hope it works well in the future. 我希望它将来能运作良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM