views:

58

answers:

1

I am just diving into Heroku and have hit a bit of a snag. Whenever I attempt to create my database I am getting the following error.

$ heroku rake db:migrate
 rake aborted!
 no such file to load -- tasks/rails
 /disk1/home/slugs/274236_54c3556_0822-55414a07-d565-459a-9412-67cc0e995790/mnt/Rakefile:10:in `require'
 (See full trace by running task with --trace)
 (in /disk1/home/slugs/274236_54c3556_0822-55414a07-d565-459a-9412-67cc0e995790/mnt)

I am a little confused about what, exactly, the error message is trying to tell me. I can verify that no file exists called 'rails' or 'rails.rb' in my lib/tasks folder. But just for sanity sake I also used scaffold to create a new RoR app in a clean dirty and verified it's not present their either.

This application was previously running under Rails 2 before I upgraded it to Rails 3. So there is a distinct chance I foo bared something up when I upgraded.

Also, in case it helps, here is the same command as above with tracing enabled:

$ heroku rake db:migrate --trace
  rake aborted!
  no such file to load -- tasks/rails
  /disk1/home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/Rakefile:10:in `require'
  /disk1/home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/Rakefile:10
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
  /home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31
  /usr/ruby1.8.7/bin/rake:19:in `load'
  /usr/ruby1.8.7/bin/rake:19
  (in /disk1/home/slugs/274236_54c3556_0822-d0995817-4e57-4415-9e95-18e86d90348d/mnt)

Any clues as to which direction to investigate would be highly appreciated.

Thanks!

EDIT

I am starting to think that Heroku is a red herring. I can attempt to run db:migrate locally and it produces the same errors (obviously with local paths instead of Heroku's paths).

This is a basic application with no special gem dependencies. Here is my Gemfile:

source :gemcutter

gem 'mysql', '2.7'
gem 'rails', '3.0.1'
#gem 'rfacebook'
gem 'sqlite3-ruby', :require => 'sqlite3'

Here is also my database.yml:

# SQLite version 3.x
#   gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000
+1  A: 

Looks like maybe your Rakefile has some Rails 2 artifacts in it or something. I'd start there, maybe comparing the default Rails 2 and Rails 3 Rakefiles.

tfe
That was exactly it! Apparently when I was upgrading to Rails 3 I overlooked the Rakefile.
Jason Whitehorn