Linux 推荐的 Ruby on Rails 3 开发 Web 服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4535220/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Recommended development web server for Ruby on Rails 3
提问by Alpha Sisyphus
What web server would you recommend for Ruby on Rails3 web development on Linux? How about Windows?
您会推荐哪种 Web 服务器用于Linux上的Ruby on Rails3 Web 开发?窗户呢?
采纳答案by Wagner Maestrelli
I'd recommend the Thinserver. Works great both on Linux and Windows. And it's very easy to install: gem install thin
. If you are using Rails 3, you may want to add it do your Gemfile instead:
我会推荐瘦服务器。在 Linux 和 Windows 上都能很好地工作。而且安装非常简单:gem install thin
. 如果您使用的是 Rails 3,您可能希望将它添加到您的 Gemfile 中:
group :development do
gem "thin"
end
And then run bundle install
.
然后运行bundle install
。
Once it's installed, you can run it with: rails s thin
.
安装后,您可以使用以下命令运行它:rails s thin
。
I find it a very fast and clean choice.
我发现这是一个非常快速和干净的选择。
Just a note: thin depends on the eventmachine gem. I had a hard time making it work on Windows. You might want to link it to this specific ref in github to avoid trouble:
请注意:瘦取决于 eventmachine gem。我很难让它在 Windows 上运行。您可能希望将其链接到 github 中的此特定 ref 以避免出现问题:
gem "eventmachine", :git => "http://github.com/eventmachine/eventmachine.git", :ref => "6c7997798"
As far as I remember, the last version of eventmachine does not build on Windows.
据我所知,事件机器的最后一个版本不是在 Windows 上构建的。
回答by glebm
Passenger 3 Standalone.
As easy as passenger start
.
乘客 3 独立。一样简单passenger start
。
On Windows the best is a VirtualBox instance running the same setup.
在 Windows 上,最好的是运行相同设置的 VirtualBox 实例。