Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Per Johannessen
Per Johannessen
2,618 Points

User Authentication with Rails - creating the user model

After completing the last test I got this error: Failure/Error: visit "/" ActionController::RoutingError: No route matches [GET] "/" # ./spec/features/users/registration_spec.rb:7:in `block (2 levels) in <top (required)>' Note: I am new to ruby on rails. and I have created my own blog instead of following the to-do list app tutorial but just wanted to add security to it so I don't know if I need to specify some route in my routes.rb. please if someone is able to help me out

2 Answers

Looks like you're redirecting to the root path (http://localhost:3000/ for example) but you don't have a route that matches that. You'll need to either redirect somewhere else or add a root path to your routes.rb file with something like this:

  root to: "welcome#index"
Per Johannessen
Per Johannessen
2,618 Points

Thank Geoff, I found out how to set it: get '/' => 'some#thing'