Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running heroku rake db:migrate from a Jenkins build fails

In my Jenkins build, the last step is to push to heroku and run a db migration. The git push works fine, and the app gets deployed, but I'm having trouble running a db migration. Below is the console output from Jenkins.

+ heroku run rake db:migrate --app myapp
Running rake db:migrate attached to terminal... stty: standard input: Invalid argument
up, run.6
stty: standard input: Invalid argument

If I run the same command from the server as the jenkins user, it works fine. I only get the error during the automated build process.

As background, this is a Rails 3.1 app running on Heroku Cedar.

like image 937
deadwards Avatar asked Sep 27 '11 20:09

deadwards


1 Answers

I was able to work around this by redirecting the output.

heroku run rake db:migrate --app myapp > rake.log
cat rake.log
like image 156
Shawn Bower Avatar answered Oct 23 '22 05:10

Shawn Bower