红联Linux门户
Linux帮助

Ubuntu 15.04设置thin1.6.4作为Rails4.2.5的默认服务器

发布时间:2016-01-19 14:56:33来源:linux网站作者:戈_戈

1.进入到Raisl项目的根目录.

2.在Gemfile中加入一行 gem 'thin'

3.运行 bundle install

4.支持 rails server thin

5.就这些.


附: 由于GFW的原因,请使用Taobao镜像做gem的源.否则第三步可能失败.


英文:Use 'Thin' as your default Server in Rails App

Rails comes with 'WeBrick Server' to run your Rails Application. When you run 'rails s' in your terminal, by default WeBrick will run.

If you want to have a thinner lighter and faster version of the rails server, you can use an alternative rails server 'thin'

To Install it add this to your GemFile

gem 'thin'

Do a

bundle install

And then run 'thin' rails server in your terminal as

rails server thin

Thats it....


本文永久更新地址:http://www.linuxdiyf.com/linux/17473.html