开发者

Rails. "unitialized Contsant Object::Contact"

I'm working through the Ruby on Rails Bible using Windows 7 and Rails 3 + mysql. I created a database and a table in mysql directly as per instructions. Then I created a model called Contact Next in irb I entered: my_contact=Contact.new and then I get the error: "unitialized constant Object::Contact"

I think perhaps I have to precede the code with a require statement or perhaps I need to install a gem? Except I haven't a clue beyond that at this stage as I'm a n开发者_如何学Pythonewbie...


Instead of running irb manually, run rails console, this should load all dependencies for your app. Also make sure you have run rake db:migrate before starting the console.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜