【发布时间】:2015-07-30 20:10:45
【问题描述】:
我正在使用 Nginx、Capistrano、Rails 运行服务器
我在本地机器上做了一些 db:migrations,然后想将它们推送到我的服务器上。但是我不知道如何在服务器上迁移我的数据库。我该怎么做?
我试过了
1)
cap production deploy
cap production deploy:migrate
2)
[On server - in current]
rake db:migrate
但这些似乎都不起作用。如何进行此迁移?
Capistrano 文件
lock '3.4.0'
require 'capistrano/sidekiq'
set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"
set :application, 'myApp'
set :repo_url, 'git...'
set :keep_releases, 5
set :scm, :git
set :repository, "git..."
set :scm_passphrase, "..."
set :user, "..."
set :use_sudo, false
set :deploy_to, "/.../.../apps/appName"
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
end
end
end
【问题讨论】:
标签: ruby-on-rails nginx capistrano