【发布时间】:2012-04-12 22:50:11
【问题描述】:
我有一个带有 rails(rvm) + nginx + Thin 的 ubuntu 服务器。
Nginx 正在监听 3000-3 端口,如果我手动启动 rails 效果很好,所以我猜问题出在 Thin。
我已将瘦配置为在端口 3000,3001,3002 中启动 3 个服务器实例,但它们没有启动并且没有报告错误。
我在 /etc/thin 中只有一个文件,这是正常的还是我遗漏了什么?该文件是 railsapp.yml。
如果我运行 bundle exec thin start,它运行正常。
编辑:运行时出现错误:
thin start --all /etc/thin
这是日志中的错误:
/home/metaloviana/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rack 1.4.1, but your Gemfile requires rack 1.3.5. Using bundle exec may solve this. (Gem::LoadError)
编辑 2:
问题解决了。使用 railsgems-bundler 和 rvm 包装器。
谢谢大家!
【问题讨论】:
-
你试过
bundle exec thin start --all /etc/thin吗? -
它可以工作,但 init.d 守护进程不能
标签: ruby-on-rails ubuntu nginx rvm thin