Closed ozgg closed 6 years ago
I have added a couple of guards to discourage wrong use. Can I take a lookt at your deploy.rb? At least your deploy task?
I doesn't differ much from one that is generated with mina init
, only in settings such as user/host:
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
set :application_name, 'paradox'
set :domain, 'paradox-life.ru'
set :deploy_to, '/var/www/paradox-life.ru'
set :repository, '...'
set :branch, 'master'
set :user, 'developer' # Username in the server to SSH to.
set :shared_dirs, fetch(:shared_dirs, []).push('tmp', 'log', 'public/uploads', 'public/ckeditor')
set :shared_files, fetch(:shared_files, []).push('.env')
task :environment do
invoke :'rbenv:load'
end
task :setup do
end
desc "Deploys the current version to the server."
task :deploy do
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
on :launch do
in_path(fetch(:current_path)) do
command %{mkdir -p tmp/}
command %{touch tmp/restart.txt}
end
end
end
end
(I've removed comments for brevity).
Gah, had a typo!
Thank you!
Released v1.2.1 with a fix
Now it fails with another error :)
-----> Creating a temporary build path
-----> Fetching new git commits
-----> Using git branch 'master'
Cloning into '.'...
done.
-----> Using this git commit
Maxim Khan-Magomedov (dbb0d30):
> Масштабирование картинки для курсов в шапке
-----> Symlinking shared paths
-----> Installing gem dependencies using Bundler
bash: line 86: bundle: command not found
! ERROR: Deploy failed.
-----> Cleaning up build
Unlinking current
OK
Connection to paradox-life.ru closed.
! Run Error
Is it somehow connected with environment
block?
I changed task :environment
to task :remote_environment
in deploy.rb
and it worked.
@ozgg thanks!
I've updated bundle to
1.2.0
and since then if I try to runmina deploy
, I get the following error without any additional information:Creating new config with
mina init
does not help. So I had to roll back to previous version.