Rails 3.1 on heroku run rake db: migrate fails

Rails 3.1

I have a heroku application with the following command

heroku create app_name --stack cedar 

I did

 git add . git commit -a -m "message" git push heroku master 

I have it in my gemfile

 group :production do gem 'pg' end group :development, :test do gem 'sqlite3' end 

When i started

 $ heroku run rake db:migrate Running rake db:migrate attached to terminal... up, run.1 me@mine ~/projects/app_name $ 

I get a running line, but nothing happens. He just goes back to $, waiting for a new team. I do not receive error messages. I have about 10 migration files in my git registry.

It's funny that he worked a few days ago. So I could have something wrong with the heroku app. I deleted it, made a new cedar stack and clicked on the repo. The same thing happened.

Update

This is in my .gitignore

 .bundle db/*.sqlite3 log/*.log tmp/ .sass-cache/ 

I tried deleting the /db/schema.rb file from the local repo and ran and clicked

I tried

 $ heroku pg:reset SHARED_DATABASE 

Any ideas?

+4
source share
1 answer

Geroku sometimes has problems with migrations:

If you have this or a simulated problem, do it

 heroku run bash --app appname rake db:migrate 
+16
source

Source: https://habr.com/ru/post/1386789/


All Articles