To Examples

Library Directions

 

  1. Create a new rails project named Library in your file for Rails projects (say c:\it231-rails):
    > rails new Library
     
  2. Navigate to the Library folder:
    > cd Library
     
  3. Create a new rails controller and three new views:
    > rails g controller Info welcome policies staff
     
  4. Replace the file Library/app/views/info/welcome.html.erb with
    welcome.html.erb.
     
  5. Replace the file Library/app/views/info/policies.html.erb with
    policies.html.erb.
     
  6. Replace the file Library/app/views/info/staff.html.erb with
    staff.html.erb.
     
  7. Replace the file Library/app/views/layouts/application.html.erb with
    application.html.erb.
     
  8. Add the file library.css to the folder Library/app/assets/stylesheets.
     
  9. Replace the file Library/app/controllers/info_controller.rb with
    info_controller.rb.
     
  10. Copy these images into the folder Library/app/assets/images:
    frieda.jpg   lotus.jpg
     
  11. Start the Rails server:
    > rails s
     
  12. In a browser navigate to this URL:
    > http://localhost:3000/info/welcome