Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3.1 on heroku run rake db:migrate does not happen

Rails 3.1

I have a heroku app made 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 this in my gemfile

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

When I run

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

I get the running line but nothing happends. It just goes back to the $, waiting for a new command. I do not get any error messages. I have about 10 migration files in my git repo.

Funny thing is that it worked a few days ago. So I tought it might be something wrong with the heroku app. I deleted it, made a new cedar stack and pushed the repo. Same thing happend.

Update

This is in my .gitignore

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

I tried to delete the /db/schema.rb file from the local repo and commited and pushed

I tried

$ heroku pg:reset SHARED_DATABASE

Any ideas?

like image 969
Andreas Lyngstad Avatar asked Dec 04 '22 18:12

Andreas Lyngstad


1 Answers

Heroku has sometimes issues with migrations:

If you have this or a simular problem do this

heroku run bash --app appname
rake db:migrate
like image 109
Andreas Lyngstad Avatar answered Dec 22 '22 01:12

Andreas Lyngstad