Quote:
Originally Posted by Jim_in_Germany
Hi,
To get the store (chpt. 6) up and running with Rails 2.x, you need to do the following:
Don't create the sql databases as instructed, instead change to your rubydev directoy (or wherever you are storing your rails projects) and type:
change to the store directory (eg with cd store)
type:
Code:
ruby script/generate scaffold Item name:string description:text price:float
Then edit the config/database.yml file, adding your sql password where appropriate.
Then back to the console and type:
Code:
rake db:create:all
rake db:migrate
That's it.
You have created a model called "Item", a database table in store_development called "items" and a controller called "ItemController"
You can add records to the database under the url:
http://localhost:3000/items
The rest should be straight forward.
Hope this helps somebody.
P.S. Running Rails 2.x, MySQL version 5.x and Ubuntu Linux
|
Hello, i followed these steps, but i really need your help: i got the error
Action Controller: Exception caught body { background-color: #fff; color: #333; } body, p, ol, ul, td { font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; } pre { background-color: #eee; padding: 10px; font-size: 11px; } a { color: #000; } a:visited { color: #666; } a:hover { color: #fff; background-color:#000; }
NoMethodError in ItemsController#index
undefined method `paginate' for #<ItemsController:0x3ad545>what's wrong, or what should i do? the rails version i'm using is 2.2.2
Thanks