Monday, February 7, 2011

What's the best linux distribution for ruby on rails development and hosting ?

I would like to know if there is a particular distribution that's more suited (has more utilities) for development and deployment of websites created using ruby on rails and javascript

Thanks

  • While there isn't much you can do in one distribution that can't be done in another, I think you can't go wrong if you choose one of the big community projects, such as Ubuntu, Fedora, or Debian. They tend to have the most software already packaged and ready to go for you and they also have a large number of tutorials, irc channels, and message boards to go to for help if you need it. Other than which community suits you best, I don't think there's a compelling reason to choose one over the other.

    From Barry
  • this is subjective. Use whatever distribution you are most comfortable with.

    From Paul
  • I suggest either Ubuntu or CentOS. I've had good luck deploying to both of these platforms, running ~30 websites using Apache and Phusion Passenger (mod_rails).

    For development, you'll do fine with almost any linux distribution as long as it has recent ruby packages or you can compile your own from source. A far as editing goes, I'm a big fan of vim with the rails.vim and project plugins. http://rails.vim.tpope.net

  • Pratik,

    The simple answer is no. I use Ubuntu personally and have no complaints.

    As for deployment, Engineyard, who specialize in Rails deployment seem to use Gentoo. So that can't be bad. But it's really a matter of preference and circumstances.

    From wmat
  • I recommend Ubuntu, simply because Slicehost have detailed instructions on setting up Rails hosting with Mongrel on Ubuntu: Slicehost Articles.

    I had never done much system admin before and was able to set everything up, and (more importantly) keep it running with the help of those docs.

    From Toby Hede
  • Actually, the single thing that improved my RoR productivity most was TextMate. It is OSX only. There seems to be some kind of clone for Windows now, E Text Editor.

    Nothing like it for Linux, but I guess Wine will run it, give it a try. Textmate is Coding Bliss, not only when developing Rails apps.

    PJ : Actually, there is such a thing for Linux -- gedit with plugins can be almost the same thing, and it's free. Just FYI.
    Alan : The submitted question is not about source code editors for Ruby, but about which *nix environment to use.
    Chubas : Actually, he asks about a development environment, and textmate being married to an OS answers somewhat that question. Mac OSX may be a great OS for developing (never used it myself BTW), but you have to be careful when deploying to your real hosting. Fortunately, Rails makes it almost transparent.
  • Cannot say which one is best and probably there is not such thing as best. I have very good experience with Debian for production and Ubuntu for development, but it might be because I am just used to the Debian style. Anyways if you like stable and well tested Linux, Debian is definitely one of the better options.

    From Honza
  • I suggest using Fedora, since it comes from the same people as RedHat EL, which you might be forced to use in a production environment. Fedora has all the needed software that can be easily installed using yum. But, as already pointed out, every modern Linux distro will do.

    From Roman
  • I agree with the general sentiment that any major distro should do the trick.

    I only manage one web server and it's an Ubuntu-based server. I've found great articles on how to set up Ubuntu with Rails and Passenger here and here.

    I must mention however that, as of 2 months ago, I wasn't able to install passenger/RubyEE on my slicehost VM. I think the newer slicehost VMs are 64bits and if I remember correctly, that was my problem.

    On the other hand I think that 64bit support has improved recently, so you may have more luck (just came back from vacation so I didn't try it again).

    Hope this helps.

    Pratik Shah : Thanks webmat for the generous links
    From webmat
  • Depends on the scale of your deployment. If you're only deploying to one app server then any Linux distro you feel comfortable maintaining will do.

    Otherwise, CentOS.

    One issue is that your project will depend on Rubygems (at least the Rails ones; probably Mongrel too), and some gems have binary extensions. It's not good practice to have lots of *-devel packages installed on a production server just so your gems will compile (you should be keeping your development/build systems separate from your production ones).

    So why CentOS?

    • Red Hat's rpmbuild system -- combined with YUM repository tools like createrepo -- make it easy to compile and deploy your own packages. You can set up a repository server and point all your production servers to it as one of their YUM sources. Then you can use gem2rpm to create packages of all the Rubygems your project needs. In fact, if you package your site as a RPM and set all the required dependencies, deployment becomes as simple as "yum install myproject".
    • If there are any other non-Ruby/Rails packages you need, you have a lot of flexibility on how to get them. For example, we've back-ported some Fedora 8 and 9 packages we needed to CentOS 4.
    • You have the option to get commercial support for your servers by buying RHEL -- or just use CentOS in production, depending on your budget. Your choice.

    Note: I'm not being bigoted against other distros (Ubuntu is great, and you can get commercial support from Canonical -- I know all that). I'm just saying that CentOS is an excellent alternative that's worked well for us.

    Matt Haley : Fedora supports gem2rpm as well.
    To1ne : Well I am about to buy a VPS server. I can choose between several OS'es including CentOs 4.7, CentOs 5.2 and CentOs 5.3. Is there any reason one of those is preferred?
    From
  • My coworkers swear by Macs for development because of textmate. I would have to say ubuntu for the server. Ubuntu is based on Debian which is a solid server operating system. I maintain a Debian server for a client, I wish I had used Ubuntu. Rails really likes to use cutting edge packages and ruby gems. Debian lags behind enough to be a problem once in awhile. My experiences with CentOS 5 remind me of Debian. It's solid but the packages are older and may be too out of date for rails.

    From epochwolf
  • Ubuntu forever :)

  • Any. I always install Ruby Enterprise from source, Apache from the distro (which most include), rubygems the gems package manager way, and the database (usually PostgreSQL) from the distro (again, most include). To be specific, I've used CentOS and Ubuntu mostly.

    From berlin.ab
  • Hi,

    If i choose Ubuntu for ROR, what option i should download, Ubuntu Desktop Edition or Server Edition

    Bill the Lizard : @Kolachi: This should be posted as a separate question on its own. See the **[Ask Question]** button at the top right of the page. You'll be able to link to this question if you think it would help.
    From Kolachi

0 comments:

Post a Comment