-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails migration failing using remote command #56
Comments
You might want to check that the environment variables are the same in both If you are using the run_remote function, it might also be an escaping On Mon, Apr 28, 2014 at 9:50 PM, Alisson Cavalcante Agiani <
|
I'm running the commands inside a script.remote.sh using RAILS_ENV=production rake db:migrate Why it could be an escaping problem? |
inside a .remote.sh script it can't be an escaping problem I'd try looking at the output of "env" to compare it in both env > /tmp/env.log On Mon, Apr 28, 2014 at 10:20 PM, Alisson Cavalcante Agiani <
|
I did it, tried using export RAILS_ENV=production in the beginning...it is crazy because rake db:migrate running with git-deliver is reverting the migrations! |
Found out the problem: git-deliver sets a VERSION variable, which rake db:migrate thinks it is the version it needs to run against, thus reverting...the solution is to run unset VERSION before it. |
Wow, that's confusing indeed ! Maybe I should to prefix all git-deliver On Mon, Apr 28, 2014 at 11:34 PM, Alisson Cavalcante Agiani <
|
I run bundle install, assets:precompile and db:migrate using the .remote.sh feature, but mgirate always fails, it tries to rerun migrations and throws "IrreversibleMigration" exception, leaving the production schema inconsistent. If I run this command inside the machine, it runs correctly.
The text was updated successfully, but these errors were encountered: