开发者

Rails. "unitialized Contsant Object::Contact"

开发者 https://www.devze.com 2023-01-29 05:33 出处:网络
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.

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

精彩评论

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

关注公众号