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

Chase Lee
Chase Lee
29,275 Points

Rails can't seem to find my routes.

Hi everyone!

I just added devise to my rails app and then refreshed the page. Then it gave me this error.

Everything works except for the /users section.

This is what's in my routes file:

Stoabook::Application.routes.draw do
  devise_for :users
  resources :statuses
  root 'statuses#index'
end

Does anybody have any idea of what's going on?

Thank you so much!

-Chase

3 Answers

Chase Lee
Chase Lee
29,275 Points

I figured it out. It was that devise doesn't generate /users. Thank you for your time!

Chris Dziewa
Chris Dziewa
17,781 Points

That is good to know! Glad you got it working!

Chris Dziewa
Chris Dziewa
17,781 Points

I'm definitely not experienced enough (yet) in Rails to tackle this on my own but I found a similar issue where every route says that error on stack overflow. The solution to their problem was restarting the server since Devise affects routing in Rails. Hopefully that helps a little at least. This is the SO page

Chase Lee
Chase Lee
29,275 Points

Unfortunately I still get the error after restarting the server.