问题描述
我基本上为我的开发/测试环境中的每个应用程序运行瘦网络服务器.当我在 Rails 2.x 中使用 Mongrel 时,我只需要输入 script/server
即可让它运行我选择的网络服务器.但是对于 Rails 3,我每次都必须指定 Thin.有没有办法让 Thin 在我的 Rails 应用程序上运行,只需输入 rails s
而不是 rails s thin
?
I run the Thin webserver for basically every app in my dev/test environments. When I used Mongrel with Rails 2.x, all I had to type was script/server
to get it to run the webserver I choose. But with Rails 3, I have to specify Thin every time. Is there a way to get Thin running on my Rails apps by just typing rails s
instead of rails s thin
?
推荐答案
从 Rails 3.2rc2 开始,当 gem 'thin'
调用 rails server
时,默认会运行 Thin代码> 在您的 Gemfile 中!感谢这个拉取请求:https://github.com/rack/rack/commit/b487f02b19332a40c8c40c5932a37c5c5934e1c0b90382d7一个>
As of Rails 3.2rc2, thin is now run by default on invoking rails server
when gem 'thin'
is in your Gemfile! Thanks to this pull request: https://github.com/rack/rack/commit/b487f02b13f42c5933aa42193ed4e1c0b90382d7
非常适合我.
这篇关于Rails 3.0.x 有没有办法默认使用 Thin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!