【问题标题】:Unicorn not starting when using mina使用 mina 时独角兽无法启动
【发布时间】:2015-02-11 16:33:25
【问题描述】:

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

RAILS_ENV=production 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

【问题讨论】:

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


    【解决方案1】:

    不好

    我知道,这实际上是 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

    【讨论】:

      猜你喜欢
      • 2012-06-01
      • 2023-03-23
      • 2023-03-09
      • 1970-01-01
      • 2013-07-02
      • 2013-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多