gpt4 book ai didi

ruby-on-rails - 好的 unicorn + nginx +帽子部署方法

转载 作者:行者123 更新时间:2023-12-04 04:22:42 24 4
gpt4 key购买 nike

谁能建议一个好的 unicorn + nginx +帽子部署好呢?
我搜索了5个小时的高支出和低支出,以使我的部署能够正常运行并出现各种错误。

最佳答案

就在昨天,我不得不设置一些 unicorn 和nginx。我跟着:

  • The article aa_memon already mentioned
  • http://www.slideshare.net/mauricio.linhares/deploying-your-rails-application-to-a-clean-ubuntu-10

  • 另外,这是我的Unicorn配置和init.d脚本: https://gist.github.com/2049606

    我最终使用的部署脚本与上面的链接中提到的脚本几乎相同。如果您使用的是RVM,请确保添加以下内容:
    $:.unshift(File.expand_path('./lib', ENV['rvm_path']))  # Add RVM's lib directory to the load path.
    require "rvm/capistrano" # Load RVM's capistrano plugin.
    set :rvm_ruby_string, '1.9.3-p125@YOURGEMSET' # Or whatever env you want it to run in.

    关键是要指定PID文件在正确的位置(我输错了,花了我半个小时才找到我的错误)。另外,请确保您的用户可以写入所有必要的文件。

    关于ruby-on-rails - 好的 unicorn + nginx +帽子部署方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9729663/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com