I am working on a Rails V2.3.2 project, I wanna create a new model, so I run the following command:
rails generate model cars name:string owner:string description:text
But I got the following error:
/home/myname/.rvm/gems/ree-1.8.7-2011.03@myapp/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /home/myname/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /home/myname/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /home/myname/.rvm/gems/ree-1.8.7-2011.03@myapp/gems/activesupport-2.3.2/lib/active_support.rb:56
...
How to get rid of this error?
P.S.
I have the code:
require 'thread'
require File.join(File.dirname(__FILE__), 'boot')
in my RakeFile , config/engironment.rb and script/server.rb
In Rails 2, the generate command is:
rails generateis the command used in Rails 3Also, models are singular by convention (use
carinstead ofcars. It will avoid much head-ache afterwards).