推荐的Ruby on Rails 3开发Web服务器 [英] Recommended development web server for Ruby on Rails 3

查看:76
本文介绍了推荐的Ruby on Rails 3开发Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Linux上的 Ruby on Rails 3 Web开发,您会建议使用哪种Web服务器? Windows怎么样?

What web server would you recommend for Ruby on Rails 3 web development on Linux? How about Windows?

推荐答案

我建议服务器.在Linux和Windows上都可以很好地工作.而且非常容易安装:gem install thin.如果您使用的是Rails 3,则可能需要将其添加到您的Gemfile中:

I'd recommend the Thin server. 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:

group :development do
  gem "thin"
end

然后运行bundle install.

安装完成后,您可以使用以下命令运行它:rails s thin.

Once it's installed, you can run it with: rails s thin.

我发现这是一个非常快捷,干净的选择.

I find it a very fast and clean choice.

仅需注意:薄薄取决于eventmachine gem.我很难使它在Windows上运行.您可能希望将其链接到github中的此特定引用以避免麻烦:

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:

gem "eventmachine", :git => "http://github.com/eventmachine/eventmachine.git", :ref => "6c7997798"

据我所知,eventmachine的最新版本不是在Windows上构建的.

As far as I remember, the last version of eventmachine does not build on Windows.

这篇关于推荐的Ruby on Rails 3开发Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆