开发者

Does the hoster has to support "Ruby on Rails" or "just Ruby" to run Rails?

开发者 https://www.devze.com 2023-01-12 23:34 出处:网络
Does the hoster have to support \"Ruby on Rails\" or \"just Ruby\" to run Rails? I know mainly PHP and ask myself if \"Ruby on Rails\" behaves to Ruby ... like \"Zend Framework\" to PHP: just a bunch

Does the hoster have to support "Ruby on Rails" or "just Ruby" to run Rails?

I know mainly PHP and ask myself if "Ruby on Rails" behaves to Ruby ... like "Zend Framework" to PHP: just a bunch of PHP files I can copy in my project folder and my hoster only needs to support PHP.

I ask as my host only supports Ruby (but not Rails). If I couild just copy r开发者_运维技巧ails over sftp within the project, I would like to give it a try.


The primary thing is, you cannot chain your Rails application directly with Web-server, so the hoster should support one of these servers: Passenger, Thin, Mongrel, and so on.

Another thing to know is, your Rails application can also depend on some specific gems, thus they should be already installed by the hoster to successfully run your application (for example, the hoster has some super-duper control panel that can deal with Rails bundles to setup every gem, check environment, do migrations, and then run the server itself; or the hoster gives you plain SSH and you do everything you need to do, if you know what to do and how to do).


The host has to support Ruby (or JRuby). Rails is a framework that's implemented as a set of Ruby files that are distributed as RubyGems.


If a web host says they support Ruby, it's assumed Rails will work. Rails is just a Ruby application though, and all the Rails code needed to run the application can (and often does) live right in your app's directory tree.


Rails is a Ruby framework. So a basic rails app needs only ruby and rubygems. RubyGems is similar to PHP Pear but a bit more flexible and powerfull. In order to serve the HTML produces by your rail app you need a webserver. Ruby provides natively a "basic" Webserver called Webrick.

But in a production environment you'll need a real webserver (Nginx, Apache) and Passenger.

0

精彩评论

暂无评论...
验证码 换一张
取 消