# Rake db:create --trace --\>\> rake aborted! uninitialized constant ActiveRecord

**URL:** <https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833>\
**Category:** Rails\
**Created:** [February 1, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833 "2008-02-01T18:19:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 1, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833/1 "2008-02-01T18:19:15Z")

</div>

Hello G.s,

I’m a noob programer, althought I’m an experienced webdesigner… I’m  
trying to learn RoR, following one of the tutorilas on RoR site.

Got some trouble installing lastest MySQL version (Mac OS X 10.4), and  
did a downgrade to 4.1.

Also got trouble with gems… did a downgrade too.

When all seems to work fine, I reached the point on tutorial that we  
need to create the db, on the terminal:

rake db:create --trace

And I got the following “rake aborted!” error:

Alexs-PowerBook:~/MyProject alexleao$ rake db:create --trace  
(in /Users/alexleao/MyProject)  
\*\* Invoke db:create (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:create  
rake aborted!  
uninitialized constant ActiveRecord  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/  
active\_support/dependencies.rb:266:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:453:in`const\_missing’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/  
active\_support/dependencies.rb:465:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake: 30 /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in`call’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in  
`execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in`each’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in  
`execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in`invoke’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in  
`synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in`invoke’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in`each’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 /usr/local/bin/rake:16:in`load’  
/usr/local/bin/rake:16

Can someone help me on this??

Thank you very much in advance!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 1, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833/2 "2008-02-01T19:25:31Z")

</div>

downgrading some stuff but not others can be a sub-optimal strategy.  
I wonder: do you have activerecord installed? you’re obviously running  
rails 2.0.2, but why the older rake? (newest is 0.8.1)

can you enter irb and type

require ‘rubygems’  
require ‘activerecord’

and not get an error?
