我正在尝试在Ubuntu 10.04上的Rails应用程序上安装轨道, ruby 。 bundle 安装工作正常,但是当我运行rake db:migrate时,我得到一些弃用警告,然后出现一个错误,声称尽管安装了系统,但系统“找不到杂种”。如果我列出 gem 杂种显然在列表中,但是运行rake命令时会出现此错误。有任何想法吗?

Could not find mongrel (~> 1.1.5) amongst [rake-0.9.2.2, RedCloth-4.2.8,
ZenTest-4.6.1, aasm-2.2.0, activesupport-2.3.14, rack-1.1.0, actionpack-2.3.14,
actionmailer-2.3.14, activerecord-2.3.14, activeresource-2.3.14, acts_as_list-0.1.4,
archive-tar-minitar-0.5.2, bcrypt-ruby-2.1.4, builder-3.0.0, bundler-1.0.18,
columnize-0.3.4, diff-lcs-1.1.2, json-1.5.3, gherkin-2.4.11, term-ansicolor-1.0.6, cucumber-1.0.2, cucumber-rails-0.3.2, daemons-1.0.10, database_cleaner-0.6.7, flexmock-0.9.0, gem_plugin-0.2.3, has_many_polymorphs-2.13, highline-1.5.2, hoe-2.12.0, hpricot-0.8.4, htmlentities-4.3.0, i18n-0.6.0, ruby_core_source-0.1.5, linecache19-0.5.12, mime-types-1.16, polyglot-0.3.2, treetop-1.4.10, mail-2.3.0, memory_test_fix-0.1.3, mongrel-1.2.0.pre2, nokogiri-1.4.7, rack-test-0.6.1, rails-2.3.14, rspec-1.3.2, rspec-rails-1.3.4, ruby-debug-base19-0.11.25, ruby-debug19-0.11.6, ruby-openid-2.1.8, rubycas-client-2.2.1, rubyjedi-actionwebservice-2.3.5.20100714122544, sanitize-1.2.1, selenium-client-1.2.18, soap4r-ruby1.9-2.0.3, sqlite3-1.3.4, test-unit-1.2.3, thoughtbot-factory_girl-1.2.2, webrat-0.7.3, will_paginate-2.3.16, yard-0.7.3]

最佳答案

尝试在Gemfile中评论杂种,然后执行以下操作:

(shell) $ mv ./config/initializers/mongrel_workaround.rb ./tmp/

然后,如果您收到以下消息:
“((... / tracks / config / locales / cz.yml):无法在第438行的第13列中解析YAML。”,您可以修复该问题,并将其添加到./config/boot.rb中(开头,在RAILS_ROOT = ...之后):
require 'yaml'
YAML::ENGINE.yamler = 'syck'

然后最后再试一次:
(shell) $ RAILS_ENV=production bundle exec rake db:migrate

10-08 17:21