独角兽在使用mina时无法启动

时间:2015-02-11 16:33:25

标签: ruby-on-rails-4 unicorn mina

当我运行mina独角兽:启动时,我收到一个错误:/ home / deployer / xxx-api / releases / 7未找到。我确定服务器上存在该目录。你能不能看看mina或mina-unicorn是否有问题。

  

RAILS_ENV =生产mina unicorn:start --verbose

Loading environment
$ source ~/.bashrc


Loading rbenv
$ export RBENV_ROOT="$HOME/.rbenv"
$ export PATH="$HOME/.rbenv/bin:$PATH"
$ eval "$(rbenv init -)"

-----> Starting Unicorn...
/home/deployer/xxx-api/releases/7 not found
Connection to 104.131.92.185 closed.

 !     Command failed.
       Failed with status 2560

1 个答案:

答案 0 :(得分:0)

<强> BAD

我知道,它实际上是黑客,但我使用了这个名为start_unicorn的任务

task :start_unicorn => :environment do
  queue "cd #{deploy_to}/#{current_path}; RAILS_EVN=#{rails_env} bundle exec unicorn -c #{deploy_to}/#{current_path}/config/unicorn.rb -E production -D"
end

然后

mina start_unicorn

不可

在deploy.rb文件中添加gemfile的路径,在我的例子中它将是:

set :bundle_gemfile,"#{deploy_to}/#{current_path}/Gemfile"

您可以在以下问题中找到相同的解决方案: https://github.com/openteam/mina-unicorn/issues/8