Running Sample Code? |
Running Sample Code? |
Jun 11 2009, 10:41 PM
Post
#1
|
|
|
|
I admit it, I got lazy with the typing and let a few chapters slip by without actually keeping my local guestbook app caught up with the code samples. Now I'd like to run the code samples provided on this site, but I'm running into trouble.
The first problem was my rails version number, as defined in environment.rb. I updated: "RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION" to: "RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION" Next, I had to change "controllers/application.rb" to controllers/application_controller.rb" Now I think I'm having trouble with migrations. I had a db table built from ~chapter 6 or so (now chapter 8), and I began by running "rake db:rollback" a few times. Then I ran "rake db:migrate" and tried to run the app. All's well and good, until I tried "new person." This throws an exception to the tune of: "ActionController::RoutingError in People#new Showing app/views/people/_form.html.erb where line #5 raised: person_url failed to generate from {:controller=>"people", :action=>"show", :id=>#<Person id: nil, name: nil, secret: nil, country: nil, email: nil, description: nil, can_send_email: nil, graduation_year: nil, body_temperature: nil, price: nil, birthday: nil, favorite_time: nil, created_at: nil, updated_at: nil, extension: nil>}, expected: {:controller=>"people", :action=>"show"}, diff: {:id=>#<Person id: nil, name: nil, secret: nil, country: nil, email: nil, description: nil, can_send_email: nil, graduation_year: nil, body_temperature: nil, price: nil, birthday: nil, favorite_time: nil, created_at: nil, updated_at: nil, extension: nil>}" What's my next move here? Or just yell at me for being lazy, that's cool too. |
|
|
|
Local_Orbit Running Sample Code? Jun 11 2009, 10:41 PM
simonstl I can't really yell at you for being lazy - I ... Jun 12 2009, 06:18 AM
Local_Orbit It's great to know that there's a rake tas... Jun 12 2009, 09:38 AM
simonstl QUOTE (Local_Orbit @ Jun 12 2009, 05:38 P... Jun 12 2009, 01:24 PM
simonstl QUOTE (simonstl @ Jun 12 2009, 09:24 PM) ... Jun 14 2009, 09:31 AM
David Coffield QUOTE (simonstl @ Jun 14 2009, 09:31 AM) ... Jul 21 2009, 06:27 AM
simonstl QUOTE (David Coffield @ Jul 21 2009, 02:2... Jul 28 2009, 12:43 PM
simonstl Sorry to have been so slow, but Chapters 1-8 are n... Aug 29 2009, 01:48 PM
tomp7877 I had put the book and my learning program aside f... Sep 6 2009, 05:47 AM![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd November 2009 - 04:26 AM |