问题描述
|
我对RoR非常陌生,我正在Windows 7环境中进行此操作。
是的,我知道,“为什么不ubuntu?”我们尝试了..性能太慢了。
无论如何,我在计算机上运行了RoR,并且创建了一个名为“ testApp \”的测试应用程序。
我在浏览器中运行它。没关系我有我的基本网站。
现在,当我尝试通过桌面上已签出的网站运行它时,我得到了
C:\\devApp>ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement\': undefined local variable or method `version_requirements\' for
#<Rails::GemDependency:0x35eae38> (NameError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:254:in `activate\'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:1204:in `gem\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `block in add_gem_load_paths\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `each\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:132:in `process\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:113:in `run\'
from C:/srw/config/environment.rb:12:in `<top (required)>\'
from <internal:lib/rubygems/custom_require>:29:in `require\'
from <internal:lib/rubygems/custom_require>:29:in `require\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require\'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/commands/server.rb:84:in `<top (required)>\'
from <internal:lib/rubygems/custom_require>:29:in `require\'
from <internal:lib/rubygems/custom_require>:29:in `require\'
from script/server:3:in `<main>\'
而且没有服务器启动。我已经仔细检查了所有宝石,以确保我按照主要开发人员告诉我的版本正确。我们俩现在都在挠头。
有人可以帮我弄清楚我所缺少的依赖性吗?
谢谢!
解决方法
我认为这是因为您的RubyGems版本已过时。尝试运行
gem update --system
将其更新为最新版本
,只需更新您的捆绑软件,也许任何一个较旧的gem与最新的gem都存在冲突,就会出现此类问题。
\'gem install bundler\'
然后\'bundler install\'
如果再次发现错误,则删除GEM.lock文件,然后运行bundler install
。它可以解决问题。
,似乎您尝试在没有所有必需的gem的情况下运行应用程序,我会尝试安装\“ Gemfile \”(应用程序的根目录)中提到的所有gems,然后再次运行该应用程序。
作为Windows用户,我真的建议您尝试像Ubuntu一样在Ubuntu中进行Rails学习和开发。安装,维护,测试应用程序和获得帮助要容易得多。