5

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
jcardenishere
  • 71
  • 2
  • 5

3 Answers3

1

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
  • No luck. Have you contacted Heroku to confirm? I'll drop them a line to see what the status is. Thanks for your suggestion. Any other options now? – jcardenishere Jun 17 '11 at 02:13
  • Heroku suggested I remove the require 'rake/file_utils' and if I could run it locally then it should work. I did and it works locally but still no luck getting it to run off Heroku. Still waiting on another response from them... – jcardenishere Jun 18 '11 at 00:28
1

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
henry74
  • 869
  • 1
  • 8
  • 14
  • Henry, Thanks for the suggestion. I tried this as well but the same error came up. I decided to do a clean re-install of everything and then I updated the code line by line once Rails was on Heroku. This worked until I reached the code for the tool bar in Cappuccino. So I took it out and now everything runs fine. Weird. – jcardenishere Jun 21 '11 at 12:34
0

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

Maybe try

require 'rake/file_utils'

in Rakefile before require 'rake'?

Community
  • 1
  • 1
Allyl Isocyanate
  • 12,435
  • 15
  • 71
  • 117
  • I just added 'require rake/file_utils' then I initialized another git push heroku master to confirm the files were up-to-date and ran heroku rake. Then I got a "! Internal server error". Then, I tried again and it's the same problem as before. – jcardenishere Jun 16 '11 at 14:33
  • I went through the "How to fix the uninitialized constant Rake::DSL problem on Heroku?" post as well but had no luck the methods recommended there. – jcardenishere Jun 16 '11 at 14:50
  • Finally got it working. I simply went through and deleted everything. Uploaded a blank Ruby on Rails template and then updated the code line by line. Apparently, the tool bar function in the Cappuccino app was causing the problems. Not sure why. Anyway, that was my fix. – jcardenishere Jun 30 '11 at 14:19