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 trialMiralina Stewart
1,549 PointsGenerating User Authentication System - rake db:migrate does nothing.
Hi,
I'm not sure where I went wrong! I added the new fields to the DeviseCreateUsers table, and then attempted to migrate. However, nothing happens... and when I type rake routes this is what I get:
miralinastewart:~/projects/treebook> rake routes statuses GET /statuses(.:format) statuses#index POST /statuses(.:format) statuses#create new_status GET /statuses/new(.:format) statuses#new edit_status GET /statuses/:id/edit(.:format) statuses#edit status GET /statuses/:id(.:format) statuses#show PUT /statuses/:id(.:format) statuses#update DELETE /statuses/:id(.:format) statuses#destroy root / statuses#index
As you can see, the devise table is completely missing. Any help greatly appreciated!
Flex Philips
4,071 PointsI'm having the same problem...hmm. I put something up on Stackoverflow. When I find out anything, I'll let you know :)
2 Answers
Twiz T
12,588 PointsCan you please post that migration file?
Richard Wigley
3,733 PointsI think there is a little confusion here migrations and routes are two separate things.
Migrations change the structure of the database tables. In rails the model's attributes are the table columns - so migrations change the model's attributes. The easiest way to see the changes are in the rails console (at the command line type: rails console). And then doing a new object and seeing the attributes (type: User.new).
The routes, the URL's the application respond to, are changed by updating config/routes.rb and then restarting the rails server. If you now do: rake routes the changes should be seen.
Rich
Miralina Stewart
1,549 PointsMiralina Stewart
1,549 Pointshere is the ######_devise_create_users.rb ... is that the migration file?