Ruby Hosting (with Rails)

Many people have asked about Rails hosting on this site, but I am not well acquainted with what you need to know if there is a difference.

I want to host some Ruby CGI web services, basically just ruby โ€‹โ€‹methods that take parameters from a POST request, access MySQL db and return data.

I looked at RoR, and it seems unnecessary because of this, from what I can say, to speed up the development of baesd data from CRUD sites, which is not at all what I am doing.

So my question is: does this affect the hosting provider that I choose? Does anyone recommend good Ruby hosting for CGI operations? I am not familiar with FastCGI, mod_ruby, Passenger, Mongrel, etc., and what they mean for performance, scalability, etc. I just want to place my ruby โ€‹โ€‹scripts with fairly good performance, and all the information there (and here) seems to be rail oriented.

+6
ruby hosting
source share
2 answers

First, if you need light weight, Sinatra is usually my first choice. Combine it with rack and Passenger for best results. It's not CGI, but realistically speaking, CGI is rarely a good match with Ruby.

Here is "Hello World!" Sinatra app from the home page:

require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end 

It is hard to get lighter weight.

As for providers, anyone who supports Passenger (mod_rack) should be able to handle Sinatra. I am a big fan of Slicehost personally, but it is a VPS host, which means that you need to be able to install and manage the entire stack. If you don't mind paying a bit for infrastructure, Heroku makes installation and deployment dead easy if your needs don't exceed what they provide (sounds like they wonโ€™t). In the unlikely event that you use only 5 MB, or if you use an external storage engine such as Amazon RDS , Heroku may actually be free for you.

Update:

  • Passenger is an Apache module that allows you to run Rack applications inside Apache.
  • A rack is a middleware layer that separates the web server and web structure from each other. This allows web frameworks to run on any web server for which there is an adapter.
  • Sinatra is a lightweight web environment that runs on top of a rack.

After installing Passenger and Rack ( gem install rack , gem install passenger ), you just need to edit vhost Apache to specify the config.ru file for your Sinatra application and create the necessary directories according to Passenger documents , and you will be well off.

+9
source share

I think you might need to watch Rack . It allows you to do what you are talking about and dismisses the weight of frameworks like Rails or Merb. Rack applications can be placed in a place such as Heroku .

0
source share

All Articles