Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Devon Latzen
Courses Plus Student 4,356 PointsGenerating the Devise Views: Routing Error
I was following along in this video on creating Devise views. After I entered the code from 1:00-1:55, I refreshed the Treebook page. Instead of showing a new view, it gave me this error:
"Routing Error No route matches [GET] "/" Try running rake routes for more information on available routes."
I have no idea what happened. I couldn't find any errors in what I typed. Here is my code from views/devise/registrations/new.html.erb:
<h2>Sign up</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :first_name %><br />
<%= f.text_field :first_name %></div>
<div><%= f.label :last_name %><br />
<%= f.text_field :last_name %></div>
<div><%= f.label :profile_name %><br />
<%= f.text_field :profile_name %></div>
<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>
<div><%= f.submit "Sign up" %></div>
<% end %>
<%= render "devise/shared/links" %>
Just for kicks, here are the first few lines of routes.rb:
Treebook::Application.routes.draw do
devise_for :users
resources :statuses
Any idea what could have gone wrong?
4 Answers

Jason Seifer
Treehouse Guest TeacherTry adding the following to your routes.rb file:
root to: 'statuses#index'

Devon Latzen
Courses Plus Student 4,356 PointsAh, thank you Jason. I just reviewed the video for installing Devise, and saw the place where you gave those instructions. http://bit.ly/xErIWz

Taryn Trueblood
21,798 PointsI did that and I still get the routing error

Taryn Trueblood
21,798 PointsNevermind, I figured out what I did wrong. I typed in the address incorrectly