开发者

"db:migrate rake aborted" error due to uninitialized constant Rake::FileUtilsExt

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开发者_JS百科 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.


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:

$ sudo gem install taps
$ heroku db:push


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.


How to fix the uninitialized constant Rake::DSL problem on Heroku? sounds similar.

Maybe try

require 'rake/file_utils'

in Rakefile before require 'rake'?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜