Routing Error, Michael Hartl's Screencasts from railstutorial.org
-
29-10-2019 - |
Question
I am following Michael Hartl's Screencasts from railstutorial.org. According to chapter 5, I changed config/routes.rb to:
SampleApp::Application.routes.draw do
match '/contact', :to => 'pages#contact'
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
root :to => 'pages#home'
end
and _footer.html.erb to:
- <%= link_to "About", about_path %>
- <%= link_to "Contact", contact_path %>
and _header.html.erb to:
<% logo = image_tag("logo.png", :alt => "Sample App", :class => "round") %>
<%= link_to logo, root_path %>
<nav class="round">
<ul>
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "Help", help_path %></li>
I am new to Ruby on Rails. I am getting a Routing Error in the browser
No route matches "/pages/contact"
I am using ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux], rails 3.0.7 and gem 1.6.2 Please help.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow