Skip to content
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

Mina setup and migrations: Files /home/base/rails/current/db/migrate/xxx.rb and ./db/migrate/xxx.rb differ #502

Closed
jmuheim opened this issue Jan 5, 2017 · 6 comments

Comments

@jmuheim
Copy link

jmuheim commented Jan 5, 2017

I followed the guide in https://github.com/mina-deploy/mina/blob/master/docs/getting_started.md step by step.

I run mina setup --verbose, and everything seems fine.

I then run mina deploy --verbose, and after installing the gems successfully, I get this:

       Files /home/base/rails/current/db/migrate/20131224105939_devise_create_users.rb and ./db/migrate/20131224105939_devise_create_users.rb differ
       Files /home/base/rails/current/db/migrate/20140228115711_rolify_create_roles.rb and ./db/migrate/20140228115711_rolify_create_roles.rb differ

No idea what this means and whether I should do something. Is this related to mina anyway?

@jmuheim
Copy link
Author

jmuheim commented Jan 5, 2017

Also during the migrations, I get some of them:

   $ RAILS_ENV="production" bundle exec rake db:migrate
   == 20161212151729 ChangeVersionsObjectToMediumText: migrating =================
   -- change_column(:versions, :object, :text, {:limit=>16777215})
      -> 0.4599s
   == 20161212151729 ChangeVersionsObjectToMediumText: migrated (0.4601s) ========
   
   Files /home/base/rails/current/vendor/assets/javascripts/jasny-bootstrap.js and ./vendor/assets/javascripts/jasny-bootstrap.js differ

@jmuheim jmuheim closed this as completed Feb 1, 2017
@dparfrey
Copy link

@jmuheim I'm running into the same "files differ" issue. If I skip the migration, the assets precompile step does the same thing.

What did you do to resolve this? I've deployed many sites with Mina before and have never gotten this. Has to be something basic, but I can't figure it out.

Thanks!

@jmuheim
Copy link
Author

jmuheim commented Sep 28, 2017

In the meantime I felt like this is the normal behaviour: mina detects changes in asset files and triggers recompile on the server, or it detects changes in migration files and trigger migration on the server.

Am I wrong? Is this something suspicious?

@dparfrey
Copy link

The problem is, it's detecting changes between my local migration files and the cloned GitHub version, and there aren't any changes. The result is to stop the deploy and not even try to run the migration (or precompile the assets). It's part of the mina script, and I agree it should be there, but don't know why it's malfunctioning for me. It's just a diff!

I've discovered some other strange behavior on my server, too, so the mina issues are likely caused by whatever else is going on. I'll post again when I figure it out (for posterity).

Thanks for replying!

@jmuheim
Copy link
Author

jmuheim commented Sep 28, 2017

Good luck! I learned a new word today, "posterity", and I'm happy that this ticket got a bit more "posterious" (is this a real word, haha?!) thanks to this conversation. 😅

@dparfrey
Copy link

dparfrey commented Oct 7, 2017

This took longer to figure out than I ever dreamed! Oddly enough, my secrets.yml file was missing the # on the first line (bad copy/paste from another file).

I have no idea why that generated the errors it did. I figured it out after trying to run the migration on the server, which generated a different, a bit more helpful, error.

Hope this helps someone else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants