Ruby on rails 4 用capistrano 3和x2B部署faye;找不到命令-
我不能让费伊和卡皮斯特拉诺开始。如果我直接在服务器上运行该命令,它就会工作 这是我的费伊食谱:Ruby on rails 4 用capistrano 3和x2B部署faye;找不到命令-,ruby-on-rails-4,capistrano3,faye,Ruby On Rails 4,Capistrano3,Faye,我不能让费伊和卡皮斯特拉诺开始。如果我直接在服务器上运行该命令,它就会工作 这是我的费伊食谱: set :faye_pid, "#{deploy_to}/shared/tmp/pids/faye.pid" set :faye_config, "#{deploy_to}/current/private_pub.ru" namespace :faye do task :start do on roles :all do execute "cd #{deploy_to}/c
set :faye_pid, "#{deploy_to}/shared/tmp/pids/faye.pid"
set :faye_config, "#{deploy_to}/current/private_pub.ru"
namespace :faye do
task :start do
on roles :all do
execute "cd #{deploy_to}/current ; RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production -D -P #{fetch(:faye_pid)}"
end
end
task :stop do
on roles :all do
execute "kill `cat #{fetch(:faye_pid)}` || true"
end
end
end
after 'deploy:publishing', 'faye:start'
before 'deploy:updating', 'faye:stop'
这是我启动Faye的配置文件:
# Run with: rackup private_pub.ru -s thin -E production
require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"
Faye::WebSocket.load_adapter('thin')
PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development")
run PrivatePub.faye_app
这就是SSHKIT错误:
SSHKit::Runner::ExecuteError: Exception while executing as ubuntu@255.255.255.255: cd /home/ubuntu/bhiz/current ; RAILS_ENV=production rackup1.6 private_pub.ru -s thin -E production -D -P /home/ubuntu/bhiz/shared/tmp/pids/faye.pid exit status: 127
cd /home/ubuntu/bhiz/current ; RAILS_ENV=production rackup private_pub.ru -s thin -E production -D -P /home/ubuntu/bhiz/shared/tmp/pids/faye.pid stdout: bash: rackup: command not found
有人能帮我理解这一点吗?我不确定这是否是一个很好的答案,但问题是,在执行之前,
rackup
正在转换为rackup1.6
。您可能需要将Pry和Pry Byebug添加到GEM文件中,将绑定。Pry
放在执行
行的前面,然后逐步查看代码的更改位置和原因。对不起。这是我使用rackup的另一个二进制文件测试命令后得到的日志之一。当前日志显示相同的错误,但前面没有1.6。我将尝试用pry和pry byebug来检查它。谢谢