问题描述
我将 Gem 'unicorn'
添加到 Gemfile 并调用 rails server unicorn -e production
,但出现加载错误.然后我添加Gem 'unicorn_rails'
,然后调用rails server unicorn -e production
,但是找不到socket文件.所以我在考虑是否不使用config/unicorn.rb
文件作为配置?所以我调用 unicorn_rails -c config/unicorn.rb -E production -D
,但我得到另一个错误 text file busy
.
I add Gem 'unicorn'
to Gemfile and call rails server unicorn -e production
, but I get a load error. Then I add Gem 'unicorn_rails'
, then call rails server unicorn -e production
, but I can't find the socket file. So I am considering if it doesn't use the config/unicorn.rb
file as the configuration? So I call unicorn_rails -c config/unicorn.rb -E production -D
, but I get another error text file busy
.
所以现在我被这件事困住了,你能帮帮我吗?:)
So now I am stuck in this matter, could you help me? :)
推荐答案
它应该是这样的:
bundle exec unicorn -E production -c config/unicorn.rb
你应该只需要 unicorn
gem
and you should only need unicorn
gem
这篇关于如何使用独角兽和配置文件在生产模式下启动 rails 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!