mina-deploy / mina

Blazing fast deployer and server automation tool

Home Page:https://rubygems.org/gems/mina

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mina deploy rails 5.2.0.beta2

nezirz opened this issue · comments

commented

Here is my mina deploy.rb:

require 'bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
require 'mina/puma'
#require 'mina/rbenv'  # for rbenv support. (https://rbenv.org)
# require 'mina/rvm'    # for rvm support. (https://rvm.io)

# Basic settings:
#   domain       - The hostname to SSH to.
#   deploy_to    - Path to deploy into.
#   repository   - Git repo to clone from. (needed by mina/git)
#   branch       - Branch name to deploy. (needed by mina/git)

set :user, 'deploy'
set :ssh_options, '-A'

set :application_name, 'selfies.vip'
set :domain, 'some ip'
set :deploy_to, '/var/www/deploy/selfies.vip'
set :repository, 'git@bitbucket.org:Zire/some.git'
set :branch, 'master'
#set :rvm_use_path, '/etc/profile.d/rvm.sh'

set :rails_env, 'production'

set :forward_agent, true
set :rvm_use_path, '/home/deploy/.rvm/scripts/rvm'

set :start_port, 80
set :current_path, 'current'
set :shared, 'current'
# Optional settings:
#   set :user, 'foobar'          # Username in the server to SSH to.
#   set :port, '30000'           # SSH port number.
#   set :forward_agent, true     # SSH forward_agent.

# Shared dirs and files will be symlinked into the app-folder by the 'deploy:link_shared_paths' step.
# Some plugins already add folders to shared_dirs like `mina/rails` add `public/assets`, `vendor/bundle` and many more
# run `mina -d` to see all folders and files already included in `shared_dirs` and `shared_files`
# set :shared_dirs, fetch(:shared_dirs, []).push('public/assets')
#set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/secrets.yml')
set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/pids', 'tmp/sockets', 'public/uploads')
set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/secrets.yml', 'config/puma.rb', 'config/master.key')
# This task is the environment that is loaded for all remote run commands, such as
# `mina deploy` or `mina rake`.

set :puma_state, -> { "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/sockets/puma.state" }
set :puma_pid, -> { "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/pids/puma.pid" }

task :remote_environment do
  ruby_version = File.read('.ruby-version').strip
  raise "Couldn't determine Ruby version: Do you have a file .ruby-version in your project root?" if ruby_version.empty?

  invoke :'rvm:use', ruby_version


  # Puma needs a place to store its pid file and socket file.
  command %(mkdir -p "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/sockets")
  command %(chmod g+rx,u+rwx "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/sockets")
  command %(mkdir -p "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/pids")
  command %(chmod g+rx,u+rwx "#{fetch(:deploy_to)}/#{fetch(:shared)}/tmp/pids")


  # If you're using rbenv, use this to load the rbenv environment.
  # Be sure to commit your .ruby-version or .rbenv-version to your repository.
  #invoke :'rbenv:load'
  # For those using RVM, use this to load an RVM version@gemset.

end

# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
task :setup do
  # command %{rbenv install 2.3.0 --skip-existing}
  command %[touch "#{fetch(:shared_path)}/config/database.yml"]
  command %[touch "#{fetch(:shared_path)}/config/secrets.yml"]
  command %[touch "#{fetch(:shared_path)}/config/puma.rb"]

  command %[touch "#{fetch(:shared_path)}/config/credentials.yml.enc"]
  command %[touch "#{fetch(:shared_path)}/config/master.key"]

  comment "Be sure to edit '#{fetch(:shared_path)}/config/database.yml', 'secrets.yml' and .puma.rb."
end

desc "Deploys the current version to the server."
task :deploy do
  deploy do
    comment "Deploying #{fetch(:application_name)} to #{fetch(:domain)}:#{fetch(:deploy_to)}"
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    #invoke :'rvm:load_env_vars'
    invoke :'bundle:install'
    invoke :'rails:db_migrate'

    command %{#{fetch(:rails)} db:seed}

    invoke :'rails:assets_precompile'
    invoke :'deploy:cleanup'

    on :launch do
      invoke :'puma_restart'
      #invoke :'puma:phased_restart'
      # in_path(fetch(:current_path)) do
      #       command %{mkdir -p tmp/}
      #        command %{touch tmp/restart.txt}
      #
      # end
    end
  end
end
task :puma_start => :remote_environment do
  command %[
    if [ -e '#{fetch(:puma_pid)}' ]; then
      echo 'Puma is already running'
    else
      echo 'Start Puma'
      cd #{fetch(:deploy_to)}/#{fetch(:current_path)} && bundle exec puma -q -d -e #{fetch(:rails_env)} -C #{fetch(:deploy_to)}/#{fetch(:current_path)}/config/puma.rb -p #{fetch(:start_port)} -S #{fetch(:puma_state)} --pidfile #{fetch(:puma_pid)}
    fi
  ]
end

task :puma_restart => :remote_environment do
  command %[
    if [ -e '#{fetch(:puma_pid)}' ]; then
      echo 'Restart Puma'
      cd #{fetch(:deploy_to)}/#{fetch(:current_path)} &&  bundle exec pumactl -S #{fetch(:puma_state)} restart
    else
      echo 'Start Puma'
      cd #{fetch(:deploy_to)}/#{fetch(:current_path)} &&  bundle exec puma -q -d -e #{fetch(:rails_env)} -C #{fetch(:deploy_to)}/#{fetch(:current_path)}/config/puma.rb -p #{fetch(:start_port)} -S #{fetch(:puma_state)} --pidfile #{fetch(:puma_pid)}
    fi
  ]
end

task :puma_stop => :remote_environment do
  command %[
    if [ -e '#{fetch(:puma_pid)}' ]; then
      cd #{fetch(:deploy_to)}/#{fetch(:current_path)} &&  bundle exec  pumactl -S #{fetch(:puma_state)} stop
      rm #{fetch(:puma_pid)}
    else
      echo 'Puma is not running. Phew!!!'
    fi
  ]
end
user@ubuntu-pc:~/RubymineProjects/mrs$ mina deploy --trace
** Invoke deploy (first_time)
** Execute deploy
** Invoke remote_environment (first_time)
** Execute remote_environment
** Invoke rvm:use (first_time)
** Execute rvm:use
** Invoke git:clone (first_time)
** Execute git:clone
** Invoke deploy:link_shared_paths (first_time)
** Execute deploy:link_shared_paths
** Invoke bundle:install (first_time)
** Execute bundle:install
** Invoke rails:db_migrate (first_time)
** Execute rails:db_migrate
** Invoke rails:assets_precompile (first_time)
** Execute rails:assets_precompile
** Invoke deploy:cleanup (first_time)
** Execute deploy:cleanup
** Invoke puma_restart (first_time)
** Invoke remote_environment (first_time)
** Execute remote_environment
** Invoke rvm:use (first_time)
** Execute rvm:use
** Execute puma_restart
-----> Creating a temporary build path
-----> Using RVM environment "2.4.2"
       Using /home/deploy/.rvm/gems/ruby-2.4.2
-----> Deploying selfies.vip to 138.68.66.181:/var/www/deploy/selfies.vip
-----> Cloning the Git repository
       Cloning into bare repository '/var/www/deploy/selfies.vip/scm'...
remote: Counting objects: 1280, done.
remote: Compressing objects: 100% (1152/1152), done.
remote: Total 1280 (delta 620), reused 113 (delta 9)
Receiving objects: 100% (1280/1280), 8.90 MiB | 7.94 MiB/s, done.   
Resolving deltas: 100% (620/620), done. 
       Checking connectivity... done.
-----> Using git branch 'master'
       Cloning into '.'...
       done.
-----> Using this git commit
       nezir (1ee2d2a):
       > Revert again to 5.2beta
-----> Symlinking shared paths
-----> Installing gem dependencies using Bundler
       The git source `git://github.com/thoughtbot/paperclip.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
       Fetching gem metadata from https://rubygems.org/........
       Fetching https://github.com/untitledkingdom/mina-puma.git
       Fetching git://github.com/thoughtbot/paperclip.git
       Fetching rake 12.3.0
       Installing rake 12.3.0
       Fetching concurrent-ruby 1.0.5
       Installing concurrent-ruby 1.0.5
       Fetching i18n 0.9.3
       Installing i18n 0.9.3
       Fetching minitest 5.11.1
       Installing minitest 5.11.1
       Fetching thread_safe 0.3.6
       Installing thread_safe 0.3.6
       Fetching tzinfo 1.2.4
       Installing tzinfo 1.2.4
       Fetching activesupport 5.2.0.beta2
       Installing activesupport 5.2.0.beta2
       Fetching builder 3.2.3
       Installing builder 3.2.3
       Fetching erubi 1.7.0
       Installing erubi 1.7.0
       Fetching mini_portile2 2.3.0
       Installing mini_portile2 2.3.0
       Fetching nokogiri 1.8.1
       Installing nokogiri 1.8.1 with native extensions
       Fetching rails-dom-testing 2.0.3
       Installing rails-dom-testing 2.0.3
       Fetching crass 1.0.3
       Installing crass 1.0.3
       Fetching loofah 2.1.1
       Installing loofah 2.1.1
       Fetching rails-html-sanitizer 1.0.3
       Installing rails-html-sanitizer 1.0.3
       Fetching actionview 5.2.0.beta2
       Installing actionview 5.2.0.beta2
       Fetching rack 2.0.3
       Installing rack 2.0.3
       Fetching rack-test 0.8.2
       Installing rack-test 0.8.2
       Fetching actionpack 5.2.0.beta2
       Installing actionpack 5.2.0.beta2
       Fetching nio4r 2.2.0
       Installing nio4r 2.2.0 with native extensions
       Fetching websocket-extensions 0.1.3
       Installing websocket-extensions 0.1.3
       Fetching websocket-driver 0.6.5
       Installing websocket-driver 0.6.5 with native extensions
       Fetching actioncable 5.2.0.beta2
       Installing actioncable 5.2.0.beta2
       Fetching globalid 0.4.1
       Installing globalid 0.4.1
       Fetching activejob 5.2.0.beta2
       Installing activejob 5.2.0.beta2
       Fetching mini_mime 1.0.0
       Installing mini_mime 1.0.0
       Fetching mail 2.7.0
       Installing mail 2.7.0
       Fetching actionmailer 5.2.0.beta2
       Installing actionmailer 5.2.0.beta2
       Fetching activemodel 5.2.0.beta2
       Installing activemodel 5.2.0.beta2
       Fetching arel 9.0.0
       Installing arel 9.0.0
       Fetching activerecord 5.2.0.beta2
       Installing activerecord 5.2.0.beta2
       Fetching activestorage 5.2.0.beta2
       Installing activestorage 5.2.0.beta2
       Fetching bcrypt 3.1.11
       Installing bcrypt 3.1.11 with native extensions
       Fetching msgpack 1.2.2
       Installing msgpack 1.2.2 with native extensions
       Fetching bootsnap 1.1.8
       Installing bootsnap 1.1.8 with native extensions
       Using bundler 1.16.1
       Fetching byebug 9.1.0
       Installing byebug 9.1.0 with native extensions
       Fetching climate_control 0.2.0
       Installing climate_control 0.2.0
       Fetching cocaine 0.5.8
       Installing cocaine 0.5.8
       Fetching coderay 1.1.2
       Installing coderay 1.1.2
       Fetching coffee-script-source 1.12.2
       Installing coffee-script-source 1.12.2
       Fetching execjs 2.7.0
       Installing execjs 2.7.0
       Fetching coffee-script 2.4.1
       Installing coffee-script 2.4.1
       Fetching method_source 0.9.0
       Installing method_source 0.9.0
       Fetching thor 0.20.0
       Installing thor 0.20.0
       Fetching railties 5.2.0.beta2
       Installing railties 5.2.0.beta2
       Fetching coffee-rails 4.2.2
       Installing coffee-rails 4.2.2
       Fetching orm_adapter 0.5.0
       Installing orm_adapter 0.5.0
       Fetching responders 2.4.0
       Installing responders 2.4.0
       Fetching warden 1.2.7
       Installing warden 1.2.7
       Fetching devise 4.3.0
       Installing devise 4.3.0
       Fetching multipart-post 2.0.0
       Installing multipart-post 2.0.0
       Fetching faraday 0.12.2
       Installing faraday 0.12.2
       Fetching ffi 1.9.18
       Installing ffi 1.9.18 with native extensions
       Fetching hashie 3.5.6
       Installing hashie 3.5.6
       Fetching multi_json 1.13.1
       Installing multi_json 1.13.1
       Fetching jbuilder 2.7.0
       Installing jbuilder 2.7.0
       Fetching jquery-rails 4.3.1
       Installing jquery-rails 4.3.1
       Fetching jwt 1.5.6
       Installing jwt 1.5.6
       Fetching material_icons 2.2.1
       Installing material_icons 2.2.1
       Fetching rb-fsevent 0.10.2
       Installing rb-fsevent 0.10.2
       Fetching rb-inotify 0.9.10
       Installing rb-inotify 0.9.10
       Fetching sass-listen 4.0.0
       Installing sass-listen 4.0.0
       Fetching sass 3.5.5
       Installing sass 3.5.5
       Fetching materialize-sass 0.100.2
       Installing materialize-sass 0.100.2
       Fetching mime-types-data 3.2016.0521
       Installing mime-types-data 3.2016.0521
       Fetching mime-types 3.1
       Installing mime-types 3.1
       Fetching mimemagic 0.3.2
       Installing mimemagic 0.3.2
       Fetching open4 1.3.4
       Installing open4 1.3.4
       Fetching mina 1.2.3
       Installing mina 1.2.3
       Fetching puma 3.11.2
       Installing puma 3.11.2 with native extensions
       Using mina-puma 1.1.0 from https://github.com/untitledkingdom/mina-puma.git (at master@120b72a)
       Fetching multi_xml 0.6.0
       Installing multi_xml 0.6.0
       Fetching oauth2 1.4.0
       Installing oauth2 1.4.0
       Fetching omniauth 1.7.1
       Installing omniauth 1.7.1
       Fetching omniauth-oauth2 1.4.0
       Installing omniauth-oauth2 1.4.0
       Fetching omniauth-facebook 4.0.0
       Installing omniauth-facebook 4.0.0
       Using paperclip 5.2.0 from git://github.com/thoughtbot/paperclip.git (at master@4ebedfb)
       Fetching pry 0.11.3
       Installing pry 0.11.3
       Fetching pry-byebug 3.5.0
       Installing pry-byebug 3.5.0
       Fetching sprockets 3.7.1
       Installing sprockets 3.7.1
       Fetching sprockets-rails 3.2.1
       Installing sprockets-rails 3.2.1
       Fetching rails 5.2.0.beta2
       Installing rails 5.2.0.beta2
       Fetching tilt 2.0.8
       Installing tilt 2.0.8
       Fetching sass-rails 5.0.7
       Installing sass-rails 5.0.7
       Fetching sqlite3 1.3.13
       Installing sqlite3 1.3.13 with native extensions
       Fetching turbolinks-source 5.1.0
       Installing turbolinks-source 5.1.0
       Fetching turbolinks 5.1.0
       Installing turbolinks 5.1.0
       Fetching uglifier 4.1.4
       Installing uglifier 4.1.4
       Bundle complete! 28 Gemfile dependencies, 89 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Post-install message from paperclip:
       ##################################################
       #  NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER      #
       ##################################################
       
       Paperclip is now compatible with aws-sdk >= 2.0.0.
       
       If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
       changes:
       
       * You must set the `s3_region`
       * If you are explicitly setting permissions anywhere, such as in an initializer,
         note that the format of the permissions changed from using an underscore to
         using a hyphen. For example, `:public_read` needs to be changed to
         `public-read`.
       
       For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
       http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
       Files current/db/migrate/20180123133354_devise_create_users.rb and ./db/migrate/20180123133354_devise_create_users.rb differ
       Files current/db/migrate/20180123134938_add_omniauth_to_users.rb and ./db/migrate/20180123134938_add_omniauth_to_users.rb differ
       Files current/db/migrate/20180125053856_create_selfies.rb and ./db/migrate/20180125053856_create_selfies.rb differ
       Files current/db/migrate/20180125053951_add_attachment_image_to_selfies.rb and ./db/migrate/20180125053951_add_attachment_image_to_selfies.rb differ
       Files current/db/migrate/20180127072432_create_likes.rb and ./db/migrate/20180127072432_create_likes.rb differ
       Files current/db/migrate/20180127083108_add_location_to_selfies.rb and ./db/migrate/20180127083108_add_location_to_selfies.rb differ
       Files current/db/migrate/20180128051445_create_comments.rb and ./db/migrate/20180128051445_create_comments.rb differ
       Files current/db/migrate/20180129050046_add_is_admin_to_users.rb and ./db/migrate/20180129050046_add_is_admin_to_users.rb differ
       Files current/db/migrate/20180129075954_rename_selfie_id_to_selfy_id.rb and ./db/migrate/20180129075954_rename_selfie_id_to_selfy_id.rb differ
       Files current/db/migrate/20180129081832_change_column_type_in_likes.rb and ./db/migrate/20180129081832_change_column_type_in_likes.rb differ
       Files current/db/migrate/20180130061316_create_reports.rb and ./db/migrate/20180130061316_create_reports.rb differ
       Files current/db/migrate/20180130093355_create_notifications.rb and ./db/migrate/20180130093355_create_notifications.rb differ
       Files current/db/migrate/20180131133318_add_member_to_notifications.rb and ./db/migrate/20180131133318_add_member_to_notifications.rb differ
       Files current/db/migrate/20180131140619_rename_notifications_column.rb and ./db/migrate/20180131140619_rename_notifications_column.rb differ
       Files current/db/migrate/20180215133106_create_subscriptions.rb and ./db/migrate/20180215133106_create_subscriptions.rb differ
-----> Migrating database
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/clusivity.rb:8: warning: already initialized constant ActiveModel::Validations::Clusivity::ERROR_MESSAGE
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/clusivity.rb:8: warning: previous definition of ERROR_MESSAGE was here
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/numericality.rb:6: warning: already initialized constant ActiveModel::Validations::NumericalityValidator::CHECKS
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/numericality.rb:6: warning: previous definition of CHECKS was here
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/numericality.rb:10: warning: already initialized constant ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/activemodel-5.2.0.beta2/lib/active_model/validations/numericality.rb:10: warning: previous definition of RESERVED_OPTIONS was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view.rb:33: warning: already initialized constant ActionView::ENCODING_FLAG
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view.rb:33: warning: previous definition of ENCODING_FLAG was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:33: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::EXPLICIT_DEPENDENCY
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:33: warning: previous definition of EXPLICIT_DEPENDENCY was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:36: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::IDENTIFIER
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:36: warning: previous definition of IDENTIFIER was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:43: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:43: warning: previous definition of VARIABLE_OR_METHOD_CHAIN was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:50: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::STRING
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:50: warning: previous definition of STRING was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:57: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:57: warning: previous definition of PARTIAL_HASH_KEY was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:63: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::LAYOUT_HASH_KEY
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:63: warning: previous definition of LAYOUT_HASH_KEY was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:79: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::RENDER_ARGUMENTS
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:79: warning: previous definition of RENDER_ARGUMENTS was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:85: warning: already initialized constant ActionView::DependencyTracker::ERBTracker::LAYOUT_DEPENDENCY
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/dependency_tracker.rb:85: warning: previous definition of LAYOUT_DEPENDENCY was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/log_subscriber.rb:10: warning: already initialized constant ActionView::LogSubscriber::VIEWS_PATTERN
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/log_subscriber.rb:10: warning: previous definition of VIEWS_PATTERN was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/log_subscriber.rb:58: warning: already initialized constant ActionView::LogSubscriber::EMPTY
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/log_subscriber.rb:58: warning: previous definition of EMPTY was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template.rb:120: warning: already initialized constant ActionView::Template::Finalizer
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template.rb:120: warning: previous definition of Finalizer was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:47: warning: already initialized constant ActionView::Resolver::Cache::PARTIAL_BLOCK
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:47: warning: previous definition of PARTIAL_BLOCK was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:48: warning: already initialized constant ActionView::Resolver::Cache::PREFIX_BLOCK
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:48: warning: previous definition of PREFIX_BLOCK was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:49: warning: already initialized constant ActionView::Resolver::Cache::NAME_BLOCK
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:49: warning: previous definition of NAME_BLOCK was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:50: warning: already initialized constant ActionView::Resolver::Cache::KEY_BLOCK
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:50: warning: previous definition of KEY_BLOCK was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:53: warning: already initialized constant ActionView::Resolver::Cache::NO_TEMPLATES
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:53: warning: previous definition of NO_TEMPLATES was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:208: warning: already initialized constant ActionView::PathResolver::EXTENSIONS
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:208: warning: previous definition of EXTENSIONS was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:209: warning: already initialized constant ActionView::PathResolver::DEFAULT_PATTERN
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/template/resolver.rb:209: warning: previous definition of DEFAULT_PATTERN was here
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/lookup_context.rb:42: warning: already initialized constant ActionView::LookupContext::Accessors::DEFAULT_PROCS
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/actionview-5.2.0.beta2/lib/action_view/lookup_context.rb:42: warning: previous definition of DEFAULT_PROCS was here
       rake aborted!
       ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:205:in `rescue in _decrypt'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:183:in `_decrypt'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:156:in `decrypt_and_verify'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_file.rb:79:in `decrypt'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_file.rb:42:in `read'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:20:in `read'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:32:in `config'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:37:in `options'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/core_ext/module/delegation.rb:274:in `method_missing'
       (erb):12:in `<main>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activestorage-5.2.0.beta2/lib/active_storage/engine.rb:55:in `block (2 levels) in <class:Engine>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:426:in `instance_exec'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:605:in `catch'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:199:in `block in halting'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `each'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `invoke_before'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:131:in `run_callbacks'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/reloader.rb:89:in `prepare!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:32:in `instance_exec'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:32:in `run'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:61:in `block in run_initializers'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:60:in `run_initializers'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:360:in `initialize!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/config/environment.rb:5:in `<main>'
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:283:in `block in require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:249:in `load_dependency'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:283:in `require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:336:in `require_environment!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:518:in `block in run_tasks_blocks'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `load'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `<main>'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'
       
       Caused by:
       ArgumentError: key must be 16 bytes
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:192:in `key='
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:192:in `_decrypt'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/message_encryptor.rb:156:in `decrypt_and_verify'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_file.rb:79:in `decrypt'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_file.rb:42:in `read'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:20:in `read'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:32:in `config'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/encrypted_configuration.rb:37:in `options'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/core_ext/module/delegation.rb:274:in `method_missing'
       (erb):12:in `<main>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activestorage-5.2.0.beta2/lib/active_storage/engine.rb:55:in `block (2 levels) in <class:Engine>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:426:in `instance_exec'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:605:in `catch'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:199:in `block in halting'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `each'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:513:in `invoke_before'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/callbacks.rb:131:in `run_callbacks'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/reloader.rb:89:in `prepare!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:32:in `instance_exec'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:32:in `run'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:61:in `block in run_initializers'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/initializable.rb:60:in `run_initializers'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:360:in `initialize!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/config/environment.rb:5:in `<main>'
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
       /var/www/deploy/selfies.vip/shared/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.1.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:283:in `block in require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:249:in `load_dependency'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.0.beta2/lib/active_support/dependencies.rb:283:in `require'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:336:in `require_environment!'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.beta2/lib/rails/application.rb:518:in `block in run_tasks_blocks'
       /var/www/deploy/selfies.vip/tmp/build-151892285927924/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
       /home/deploy/.rvm/gems/ruby-2.4.2/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `load'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/bundle:23:in `<main>'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
       /home/deploy/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'
       Tasks: TOP => db:migrate => db:load_config => environment
       (See full trace by running task with --trace)
 !     ERROR: Deploy failed.
-----> Cleaning up build
       Unlinking current
       Connection to 138.68.66.181 closed.

       OK
 !     Run Error

So errors summary is:

  ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage

   Caused by:
       ArgumentError: key must be 16 bytes

I am running ruby 2.4.2

That doesn't look related to Mina... Guessing a corrupted key in your production config? Can you start Rails locally, but in production mode?

Yes, this wasn't up to mina.