views:

215

answers:

2

I'm running rails on Mac OS X. I think I installed it correctly, but I'm getting the following error.

$ rake db:create
(in /Users/user_name/myapp)
rake aborted!
Could not find RubyGem mocha (>= 0)

(See full trace by running task with --trace)

What is the problem? How do I fix it?

+4  A: 

Looks like you're missing the mocha gem. Running sudo gem install mocha should fix the problem.

Matt Grande
+1  A: 

You can also use:

sudo rake gems:install

So it will go through your environment.rb to see which gems are depended upon and install them.

Garrett
I'm not sure, but I think him seeing that error message means it's not in the environment file. I think it it's in the environment file, it says "run rake gems:install" in the error message.
Matt Grande