简体   繁体   English

Rails应用程序从终端运行,但不是从Netbeans运行-缺少gem错误

[英]Rails application runs from terminal but not from Netbeans - missing gem error

Been trying to get my project up and running on an Ubuntu Virtual Box machine. 一直在尝试让我的项目在Ubuntu Virtual Box计算机上运行。 Everything works fine from the terminal, but when I try to run my application from Netbeans I get the following error: 在终端上一切正常,但是当我尝试从Netbeans运行应用程序时,出现以下错误:

=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/home/soroush/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
Missing these required gems:
  i18n  = 0.3.7

You're running:
  ruby 1.8.7.249 at /usr/bin/ruby1.8
  rubygems 1.3.7 at /home/soroush/.gem/ruby/1.8, /var/lib/gems/1.8

Run `rake gems:install` to install the missing gems.

Running 'gem list' from the terminal shows that i DO have i18n installed. 从终端运行“宝石列表”显示我确实安装了i18n。 I've searched for answers but haven't really been able to find anything that correlates to my specific error. 我一直在寻找答案,但实际上并没有找到与我的特定错误相关的任何内容。

Thanks in advance for any help! 在此先感谢您的帮助! Regards, Emil 问候,埃米尔

What happens if you right-click on your project, choose "Run / Debug Rake Task" and run the gems:install task mentioned above? 如果右键单击您的项目,选择“运行/调试Rake任务”并运行上面提到的gems:install任务,会发生什么?

Alternatively you should right-click on the project, choose Properties, choose "Gems" in the sidebar and add the i18n gem there. 或者,您应该右键单击该项目,选择“属性”,在侧栏中选择“ Gems”,然后在其中添加i18n gem。 I had to do that for a project to get debugging working within netbeans, installing the correct gem using bundler from the command-line didn't do anything that NetBeans was picking up. 我必须这样做,才能使项目在Netbeans中进行调试,使用命令行中的bundler安装正确的gem并不能完成NetBeans的工作。

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

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