我刚刚从客户那里继承了一个 Rails 站点,并试图在我的计算机上启动并运行它。不断遇到有关依赖项和 ruby 版本的错误。有没有正确的方法来解决这个问题,还是只是继续摆弄宝石的版本,直到一切都很好
这是我在站点根目录中名为 GEM_LIST 的文件中拥有的宝石列表:
actionmailer (2.2.2)
actionpack (2.2.2)
activemodel (3.0.9)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (3.0.9, 2.2.2)
arel (2.0.10)
builder (2.1.2)
capistrano (2.8.0)
chronic (0.6.2)
composite_primary_keys (2.2.2)
diff-lcs (1.1.2)
highline (1.6.2)
hominid (3.0.2)
i18n (0.5.0)
mysql (2.8.1)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
rack (1.3.2)
rails (2.2.2)
rake (0.8.7)
rspec (1.3.2)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (1.3.2)
tzinfo (0.3.29)
will_paginate (2.3.16)
我尝试单独安装每个并尝试运行 ruby 脚本/服务器并收到此错误
/home/#####/.rvm/gems/ruby-1.8.7-p358/gems/rails-2.2.2/lib/rails/gem_dependency.rb:224:in `specification': undefined method `version_requirements=' for #<Gem::Dependency:0x7f4a3f884308> (NoMethodError)
运行 ruby 1.8.7 Gem 版本 1.3.6