“db:迁移 rake 已中止”由于未初始化常量 Rake::FileUtilsExt 导致的错误
我是 Ruby on Rails 的新手,我一直在尝试部署一个简单的 Cappuccino<过去三天,使用 Ruby on Rails 的 /a> 应用程序连接到 Heroku,每次初始化 (heroku rake db:migrate
) 时,我都会收到以下错误。
(in /app)
rake aborted!
uninitialized constant Rake::FileUtilsExt
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/Rakefile:15:in `<module:RakeFileUtils>'
/app/Rakefile:14:in `<top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
我已经更新了所有必需的宝石和捆绑包。 这是我的宝石列表,供您参考:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.9, 3.0.8, 3.0.7, 3.0.5)
actionpack (3.0.9, 3.0.8, 3.0.7, 3.0.5, 2.3.8)
activemodel (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activerecord (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activeresource (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activesupport (3.0.9, 3.0.8, 3.0.7, 3.0.5, 2.3.8)
arel (2.1.1, 2.0.10, 2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.15)
capistrano (2.6.0, 2.5.20)
configuration (1.2.0)
daemons (1.1.3, 1.1.0)
dnssd (2.0)
erubis (2.7.0, 2.6.6)
eventmachine (0.12.10)
fastthread (1.0.7)
fcgi (0.8.8)
heroku (2.3.0, 2.2.8 ruby)
highline (1.6.2, 1.6.1)
hpricot (0.8.4)
i18n (0.6.0, 0.5.0)
jk-ferret (0.11.8.3)
launchy (0.4.0)
libxml-ruby (2.0.6, 1.1.4)
mail (2.3.0, 2.2.19, 2.2.15)
mime-types (1.16)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.4, 2.1.3)
net-ssh-gateway (1.1.0, 1.0.1)
polyglot (0.3.1)
rack (1.3.0, 1.2.3)
rack-mount (0.8.1, 0.7.1, 0.6.14)
rack-test (0.6.0, 0.5.7)
rails (3.0.9, 3.0.8)
railties (3.0.9, 3.0.8)
rake (0.9.2, 0.8.7)
rdoc (3.6.1)
RedCloth (4.2.7)
rest-client (1.6.3)
ruby-openid (2.1.8)
rubygems-update (1.8.5, 1.6.2)
sequel (3.24.1, 3.20.0)
sinatra (1.2.6, 1.0)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
taps (0.3.23)
term-ansicolor (1.0.5)
thin (1.2.11)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
tzinfo (0.3.28, 0.3.25)
xmpp4r (0.5)
这是捆绑包列表:
{Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.8)
* actionpack (3.0.8)
* activemodel (3.0.8)
* activerecord (3.0.8)
* activeresource (3.0.8)
* activesupport (3.0.8)
* arel (2.0.10)
* builder (2.1.2)
* bundler (1.0.15)
* erubis (2.6.6)
* i18n (0.5.0)
* mail (2.2.19)
* mime-types (1.16)
* polyglot (0.3.1)
* rack (1.2.3)
* rack-mount (0.6.14)
* rack-test (0.5.7)
* rails (3.0.8)
* railties (3.0.8)
* rake (0.9.2)
* sqlite3 (1.3.3)
* thor (0.14.6)
* treetop (1.4.9)
* tzinfo (0.3.28)}
我已经尝试了所有方法,而且我的个人已处于停产状态。我花了很多时间探索这里的问题并尝试一切可用的方法。
I'm new to Ruby on Rails, and I've been trying to deploy a simple Cappuccino app with Ruby on Rails on to Heroku for the last three days, and every time I initialize (heroku rake db:migrate
) I keep get the following error.
(in /app)
rake aborted!
uninitialized constant Rake::FileUtilsExt
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/Rakefile:15:in `<module:RakeFileUtils>'
/app/Rakefile:14:in `<top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
I have updated all the required gems and bundles.
Here is my gem list for your reference:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.9, 3.0.8, 3.0.7, 3.0.5)
actionpack (3.0.9, 3.0.8, 3.0.7, 3.0.5, 2.3.8)
activemodel (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activerecord (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activeresource (3.0.9, 3.0.8, 3.0.7, 3.0.5)
activesupport (3.0.9, 3.0.8, 3.0.7, 3.0.5, 2.3.8)
arel (2.1.1, 2.0.10, 2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.15)
capistrano (2.6.0, 2.5.20)
configuration (1.2.0)
daemons (1.1.3, 1.1.0)
dnssd (2.0)
erubis (2.7.0, 2.6.6)
eventmachine (0.12.10)
fastthread (1.0.7)
fcgi (0.8.8)
heroku (2.3.0, 2.2.8 ruby)
highline (1.6.2, 1.6.1)
hpricot (0.8.4)
i18n (0.6.0, 0.5.0)
jk-ferret (0.11.8.3)
launchy (0.4.0)
libxml-ruby (2.0.6, 1.1.4)
mail (2.3.0, 2.2.19, 2.2.15)
mime-types (1.16)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.4, 2.1.3)
net-ssh-gateway (1.1.0, 1.0.1)
polyglot (0.3.1)
rack (1.3.0, 1.2.3)
rack-mount (0.8.1, 0.7.1, 0.6.14)
rack-test (0.6.0, 0.5.7)
rails (3.0.9, 3.0.8)
railties (3.0.9, 3.0.8)
rake (0.9.2, 0.8.7)
rdoc (3.6.1)
RedCloth (4.2.7)
rest-client (1.6.3)
ruby-openid (2.1.8)
rubygems-update (1.8.5, 1.6.2)
sequel (3.24.1, 3.20.0)
sinatra (1.2.6, 1.0)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
taps (0.3.23)
term-ansicolor (1.0.5)
thin (1.2.11)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
tzinfo (0.3.28, 0.3.25)
xmpp4r (0.5)
And here is the Bundle list:
{Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.8)
* actionpack (3.0.8)
* activemodel (3.0.8)
* activerecord (3.0.8)
* activeresource (3.0.8)
* activesupport (3.0.8)
* arel (2.0.10)
* builder (2.1.2)
* bundler (1.0.15)
* erubis (2.6.6)
* i18n (0.5.0)
* mail (2.2.19)
* mime-types (1.16)
* polyglot (0.3.1)
* rack (1.2.3)
* rack-mount (0.6.14)
* rack-test (0.5.7)
* rails (3.0.8)
* railties (3.0.8)
* rake (0.9.2)
* sqlite3 (1.3.3)
* thor (0.14.6)
* treetop (1.4.9)
* tzinfo (0.3.28)}
I've tried everything, and I am at my personal EOL. I've spent a good deal of time exploring the questions here and trying everything available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在带有新的小型 Rails 应用程序的新 Heroku 服务器上收到相同的错误,但之前没有收到过。也许这是一个新的 Heroku 问题?
使用 Tap 推送本地数据库是一种快速修复方法,但既不是可扩展的,也不是合理的长期解决方案:
I am receiving the same error on a new Heroku server with a new, tiny Rails application and have not received it before. Perhaps this is a new Heroku issue?
Pushing the local database with taps worked as a quick-fix, but is neither a scalable nor reasonable long-term solution:
Rake 的版本存在一个已知问题。尝试将 Rake 版本回滚到 0.8.7。
请参阅 Twitter DHH 的评论 (2011-05-21):Rake 0.9昨天发布的版本破坏了 Rails(和其他)。在我们等待修复期间,您需要在 Gem 文件中包含
gem 'rake', '0.8.7'
。There is a known problem with the version of Rake. Try rolling your Rake version back to 0.8.7.
See the Twitter remark from DHH (2011-05-21): Rake 0.9, which was released yesterday, broke Rails (and others). While we wait for a fix, you'll want to have
gem 'rake', '0.8.7'
in your Gem file.如何修复未初始化常量 Rake::DSL 问题Heroku? 听起来很相似。
尝试在Rakefile中?
也许在需要'rake'之前
How to fix the uninitialized constant Rake::DSL problem on Heroku? sounds similar.
Maybe try
in Rakefile before require 'rake'?