1

当我运行 mina unicorn:start 时,出现错误:/home/deployer/xxx-api/releases/7 not found 。我确定服务器上存在该目录。请您看看是否是 mina 或 mina-unicorn 的问题。

RAILS_ENV=生产米娜独角兽:开始 --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
4

1 回答 1

0

我知道,它实际上是 hack,但我使用了这个名为 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

于 2015-02-17T12:18:09.967 回答