Ruby on rails 米娜不工作了
我正在尝试使用Mina部署应用程序,但出现以下错误:Ruby on rails 米娜不工作了,ruby-on-rails,ruby-on-rails-4,deployment,Ruby On Rails,Ruby On Rails 4,Deployment,我正在尝试使用Mina部署应用程序,但出现以下错误: -----> Skipping asset precompilation $ cp -R "/home/deploy/integracao/current/public/assets" "./public/assets" cp: cannot create directory ‘./public/assets’: No such file or directory ! ERROR: Deploy f
-----> Skipping asset precompilation
$ cp -R "/home/deploy/integracao/current/public/assets" "./public/assets"
cp: cannot create directory ‘./public/assets’: No such file or directory
! ERROR: Deploy failed.
我第一次部署时,一切正常。在第二遍(等等)中,我看到了上面的错误。这是我的
deploy.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
set :domain, '192.168.0.87'
set :deploy_to, '/home/deploy/integracao'
set :repository, 'https://github.com...'
set :branch, 'master'
set :rails_env, 'production'
set :shared_paths, ['config/database.yml', 'log', 'config/application.yml']
set :user, 'deploy' # Username in the server to SSH to.
task :environment do
# If you're using rbenv, use this to load the rbenv environment.
# Be sure to commit your .rbenv-version to your repository.
invoke :'rbenv:load'
# For those using RVM, use this to load an RVM version@gemset.
# invoke :'rvm:use[ruby-1.9.3-p125@default]'
end
# Put any custom mkdir's in here for when `mina setup` is ran.
# For Rails apps, we'll make some of the shared paths that are shared between
# all releases.
task :setup => :environment do
queue! %[mkdir -p "#{deploy_to}/shared/log"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"]
queue! %[mkdir -p "#{deploy_to}/shared/config"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"]
queue! %[touch "#{deploy_to}/shared/config/database.yml"]
queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."]
end
desc "Deploys the current version to the server."
task :deploy => :environment do
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
to :launch do
queue "touch #{deploy_to}/tmp/restart.txt"
end
end
end
我刚刚在部署任务中更改为
invoke:'rails:assets\u precompile:force'
,并使其工作我刚刚在部署任务中更改为invoke:'rails:assets\u precompile:force'
,并使其工作