Closed nikita-v closed 10 years ago
Are you sure you have gem Bundler installed on the server under ruby-2.1.0?
"ebashim"! :christmas_tree:
server@dhcppc4:~$ rvm 2.1.0@ebashim server@dhcppc4:~$ bundle -v Bundler version 1.5.1
Have you tried updating this gems (+sshkit) to latest version? - there was change in how commands are built.
Yes. Gem sshkit updated to latest version (from gihtub)
How about capistrano-bundler and capistrano-rvm?
With capistrano-rvm from github all works. =)
it would be enough to use 0.1.0
- it was released a month ago with a fix for your problem.
Thanks. Happy new Year!
I have similar proplem
gem 'capistrano', '~> 3.2.0'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rvm', '~> 0.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'sshkit', '~> 1.4.0'
cap production unicorn:start
rvm 1.25.23 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
ruby-2.1.1@project_name
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
INFO [a152c2d4] Running /usr/bin/env /srv/projects/project_name/shared/bin/unicorn -c /srv/projects/project_name/current/config/unicorn.rb -D -E production on [server ip here]
cap aborted!
SSHKit::Command::Failed: /srv/projects/project_name/shared/bin/unicorn exit status: 127
/srv/projects/project_name/shared/bin/unicorn stdout: Nothing written
/srv/projects/project_name/shared/bin/unicorn stderr: Nothing written
/home/username/.rvm/gems/ruby-2.1.1@project_name/gems/sshkit-1.4.0/lib/sshkit/command.rb:98:in `exit_status='
127
means the command to run was not found, are you sure that unicorn
is available in /srv/projects/project_name/shared/bin/unicorn
?
This task from deploy.rb
namespace :unicorn do
def run_unicorn
execute "#{fetch(:bundle_binstubs)}/unicorn", "-c #{release_path}/config/unicorn.rb -D -E #{fetch(:stage)}"
end
desc 'Start unicorn'
task :start do
on roles(:app) do
run_unicorn
end
end
If i run "/usr/bin/env /srv/projects/project_name/shared/bin/unicorn -c /srv/projects/project_name/current/config/unicorn.rb -D -E production" on the server manually, all works fine. "/srv/projects/project_name/shared/bin/unicorn" exist
instead of:
execute "#{fetch(:bundle_binstubs)}/unicorn", ...
try:
execute :bundle, :exec, :unicorn, ...
execute :bundle, :exec, :unicorn, "-E #{fetch(:stage)}", "-c #{fetch(:unicorn_conf)}"
INFO [06a18687] Running /usr/local/rvm/bin/rvm default do bundle exec unicorn -E production -c /srv/projects/project_name/current/config/unicorn.rb on [server ip here]
cap aborted!
SSHKit::Command::Failed: bundle exit status: 10
bundle stdout: Nothing written
bundle stderr: Nothing written
does any other command that needs RVM to work? please open a new ticket including your details .... also have you tried rvm1-capistrano3 - it is "improved" version of this gem and there is even a PR to merge this projects.
Hi all! Installed gems:
I get this error: bash: bundle: command not found
ps Sorry for my bad english