gpt4 book ai didi

ruby-on-rails - rake db 错误 :migrate with mongrel, "Could not find mongrel"

转载 作者:行者123 更新时间:2023-12-02 00:27:52 26 4
gpt4 key购买 nike

我正在尝试在 ubuntu 10.04 上安装 track,这是一个 ruby​​ on rails 应用程序。 Bundle install 工作正常,但是当我运行 rake db:migrate 时,我收到一些弃用警告,然后出现一个错误,声称该系统“无法找到 mongrel”,尽管它已安装。如果我列出 gems mongrel 显然在列表中,但是当运行 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 中评论 mongrel 并做:

(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

关于ruby-on-rails - rake db 错误 :migrate with mongrel, "Could not find mongrel",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8199279/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com