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!
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

Robert Borsey
Courses Plus Student 9,636 PointsRouting Error No route matches [GET] "/robertborsey"
Can someone please help with this I'm getting this error ''' No route matches [GET] "/robertborsey" and then I put this code in routes.rb
get '/:id', to: 'profiles#show'
I get this
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
'''
can anybody tell me whats going on
thanks for the help
6 Answers

Brandon Barrette
20,485 PointsIn your model you need to change the to_param to use the profile_name as the id, so this should be in user.rb
def to_param
profile_name
end

Robert Borsey
Courses Plus Student 9,636 PointsThanks for answering Brandon, Tried that and still didn't work. Any other thing I might have missed ?

Brandon Barrette
20,485 PointsThen make sure there is a user with that profile name in your database. Make sure it hasn't been misspelled and that the profile name is there. That would be my last guess at what is wrong with the error information you've provided.

Robert Borsey
Courses Plus Student 9,636 PointsDo you mean in my users.yml file ?

Brandon Barrette
20,485 PointsNo. That file is for testing only. Go to your terminal, type rails console
Then type User.all
That will spit out all users. Make sure your user with that profile name is there.

Robert Borsey
Courses Plus Student 9,636 PointsYes I'm in there.