- May 2nd: Read the first 33 pages of RailsSpace.
- Book URL on page 5.
- NOTE THAT ALL PAGE NUMBERS ARE FROM RailsSpace Book unless otherwise.
- Ran "rails.bat ralis_space" on my Vista/PC and it created the project under my RAILSPASSION directory. (pg.16)
- Ran "cd rails_space ; ruby script/server" and got this. (pg.18) : => Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server - I checked "localhost:3000" and got default screen as seen on page 19.
- Then I did this: $ ruby script/generate controller site index about help and got this: (p.21)
exists app/controllers/
exists app/helpers/
create app/views/site
exists test/functional/
create test/unit/helpers/
create app/controllers/site_controller.rb
create test/functional/site_controller_test.rb
create app/helpers/site_helper.rb
create test/unit/helpers/site_helper_test.rb
create app/views/site/index.html.erb
create app/views/site/about.html.erb
create app/views/site/help.html.erb - Then I did this: "gem rdoc --all" - Got a few, then errored out. (p.24)
- Edited routes.rb as specificed on page 26. Deleted Public/index.html and edited views/site/index.rhtml as specificed on page 26. Then refreshed web page and got the screen as shown on top of page 27.
- Then i edited aobut.rhtml and help.rhtml as specified on page 28. Then created site.rhtml as specified on page 29.
- Then I edited/shortened index.rhtml on bottom of page 29. Refresh web page and saw that it worked. Also shorten about.rhtml and help.rhtml web pages on specified on page 30.
- Set up Netbeans for RailsSpace and moved 1st 11 steps of data under Netbeans directiory. After a few bumps, it worked as seen (the web page) on bottom of page 33.
- Then I modified (removed extra curly braces/paras) site.rhtml as specificed on page 36 and refreshed web page. It worked.
- Then changed all "link_to" to "link_to_unless_current" as specified on page 37.
- Downloaded the RailsSpace files zip file from publisher and used "site.css" as specified on page 40. Restarted webserver and check all 3 web pages. They worked as seen on page 41.
- End of Chapter 2
- HAD TO REBUILD THE PROJECT/REPEAT CHAPTER 2 INSIDE NETBEANS to get NETBEANS to BUILD DATA
- Used netbeans to create:db (pg.43-45).
- Used netbeans to generate model for User (p.47).
- Then add 3 columns (screen_name, email, password) to migration file (p.48).
- Used netbeans to run db:migrate. (p.49)
- Enter one user using netbean's console. (p.52-53)
- Then added 5 validations to user model. (p.54)
- Then added constants to user model as specified on page 55-56.
- Then added validate method as specified on page 57.
- Then added "if" statemend as specified on top of page 58.
- Then added "full-strength" validations as specified on page 59.
- I skipped page 62 where it wanted me to add create_at and update_at since netbeans or rails already added them. (p.62)
- Finished Chapter 3.
- Chapter 4: Generated another controller, "user", with index and register views. (p.66)
- Then edited user_controller.rb as specified at bottom of page 67.
- Then copied site.rhtml into brand new application.rhtml view. (p.68)
- Then undid step 30. (smile) (p.g68).
- Then edited register.rhtml to add CSS. (p.68-69)
- Then edited site.css file as specified on page 69.
- WEB PAGE DISPLAY IS BROKEN (p.66,68,71,76) (get: Routing Error ;
No route matches "/user" with {:method=>:get}) UNCLEAR IF I SHOULD BE ABLE TO DISPLAY WEB PAGE.\
Fix step 36 by restarting the server.
Then edited user.rb model as specified on bottom of page 73.
- Then edited register.rb as specified on page 74.
- Then added debug lines to application.rhtml and site.css as on page 75-76.
- Then add processing code to user_controller as on page 78.
- Then edited register.rb as specified on page 84.
- Then edited site.css file as specified on page 85.
- Then edited applicaton.rhtml as specified on page 86.
- Then edited site.css file as specified on page 87.
- Then edited application.rhtml as specified on bottom of page 87.
- Then edited user_controller.rb as specified on page 88.
- Then edited index.rhtml view and user_controller.rb controller as specified on page 89.
- Then edited application.rhtml layout as specified on page 90-91.
- Then edited application.rhtml layout as specified on page 91.
- Then edited the application_helper.rb file as specified on page 92 and page 93.
- Then edited the application.rhtml layout file as specified on page 93.
- Finally for chapter 4, I dropped the tables and recreated the tables as specified on page 95 and then entered one user as specified on page 95. AND IT WORKED.
- End of Chapter 4. Testing next.
Sunday, May 3, 2009
My RailsSpace Journey - Day 2
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment