Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Ruby on Rails
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Ruby on Rails
This is the forum to discuss the Wrox book Beginning Ruby on Rails by Steve Holzner Ph.D.; ISBN: 9780470069158
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #11 (permalink)  
Old April 17th, 2009, 10:53 AM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Jim_in_Germany View Post
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:
Code:
rails store
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
  #12 (permalink)  
Old February 16th, 2010, 03:28 AM
Registered User
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default thanks jim

thanks a lot jim

it work for me even i am using ruby 2.2

great man keep it up........................
  #13 (permalink)  
Old August 14th, 2010, 12:20 AM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Building app set to MySQL

Thanks Jim for the great instructions.

It's also worth noting that you can default to MySQL by creating your app with the following, saving .yml cleanup time.
Code:
$ rails -d mysql store
Best of luck.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 6: scaffold syntax error cwhite124 BOOK: Beginning Ruby on Rails 1 January 3rd, 2008 07:20 AM
Can someone see what i did wrong here chapter 6 amo BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 April 8th, 2004 02:12 PM
Is Chapter 13 Code wrong??? miggitty VB.NET 2002/2003 Basics 0 December 31st, 2003 12:20 AM



All times are GMT -4. The time now is 11:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.