How do you rake a Heroku database?
I have an application on Heroku. However, whenever I change my database locally and then push the changes to the application, the database doesn't not change.
I realized that I need to run a rake on the Heroku database. However when I try heroku rake db:migrate
I get the following error.
rake aborted! uninitialized constant Rake::DSL`
How do I solve this problem?
I've been improvising with heroku db:push
, but 开发者_开发问答that will not be able to hold because it deletes the current database.
If you are using the new Cedar Stack, you should use
heroku run rake db:migrate
Use:
heroku rake db:version
Source:
http://devcenter.heroku.com/articles/rake
Append w/ "heroku" or just type "heroku" in your terminal for instructions
heroku rake db:migrate
Your error for rake aborted! Uninitialized constant Rake::DSL
is probably down to rake versions - see Stack Overflow question Ruby on Rails and Rake problems: uninitialized constant Rake::DSL for a fix.
精彩评论