unicorn 和 unicorn_rails 有什么区别? [英] what is the difference between unicorn and unicorn_rails?

查看:69
本文介绍了unicorn 和 unicorn_rails 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那么...unicornunicorn_rails 之间有什么区别
我什么时候应该使用一种或另一种?

So...what is the difference between unicorn and unicorn_rails
When should I use one or another?

推荐答案

https://blog.engineyard.com/2010/everything-you-need-to-know-about-unicorn:

独角兽可执行文件是什么?unicorn_rails 可执行文件是什么?

unicorn 可执行文件是模仿 Rack 的rackup"的 Rack-only 工具,推荐用于 Rack 应用程序.unicorn_rails 旨在让 Rails 的 pre-Rack 版本的用户更轻松地过渡.联机帮助页鼓励 Rails 3 用户改用普通的 unicorn.

The unicorn executable is a Rack-only tool modeled after Rack’s "rackup" and is recommended for Rack applications. unicorn_rails was made to be an easier transition for users of pre-Rack versions of Rails. The manpage encourages Rails 3 users to use plain unicorn instead.

有什么区别?

unicorn_rails 联机帮助页中,unicorn_rails 的一些约定模仿了 Rails 中的 script/server.它在tmp"下创建目录,如 script/server-E/–environment 开关设置 RAILS_ENV 而不是 RACK_ENV.

From the unicorn_rails manpage, some conventions of unicorn_rails are modeled after script/server found in Rails. It creates directories under "tmp" like script/server and the -E/–environment switch sets RAILS_ENV instead of RACK_ENV.

除此之外,根据我的经验,某些 gem 可能特别需要 unicorn_rails,例如 activeadmin(请参阅 这个)

Apart from that, in my experience, some gems may need unicorn_rails in particular, like activeadmin (see this)

此外,手册页:

它旨在帮助 Rails 1.x 和 2.y 用户过渡到 Rack,但是Rails 3 应用程序不需要它.Rails 3 用户是鼓励使用 unicorn(1) 而不是 unicorn_rails(1).的用户Rails 1.x/2.y 也可以使用 unicorn(1) 而不是 unicorn_rails(1).

It is designed to help Rails 1.x and 2.y users transition to Rack, but it is NOT needed for Rails 3 applications. Rails 3 users are encouraged to use unicorn(1) instead of unicorn_rails(1). Users of Rails 1.x/2.y may also use unicorn(1) instead of unicorn_rails(1).

这篇关于unicorn 和 unicorn_rails 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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