Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've spent a few hours this morning trying to setup Rails on a fresh instance of Ubuntu and I noticed that the process is incredibly more convoluted than on Windows. On Windows I go to rubyinstaller.org, run the executable (I was specifically interested in 1.9.2-p180) and then adjust the system path accordingly. Rails also requires no additional steps, I can clone a git repository and start cranking away.

On Ubuntu I had to install the RVM (which I could have done for Windows as well), install the prereqs that is listed, have the apt-get fail because a bunch of those packages were no longer available. I then finally ran rvm install only to find out that make wasn't going to work, so I had to manually comment out a bunch of dependencies on openssl from one of the .c files and rebuild it, then it finally installed. Rails was still far from done though, so I had to install another bunch of prerequisites, edit some extra file in the ruby source and execute it, and then I could finally get rails console to even start.

Is this pretty normal? Should I pretty much expect everything to take a couple of extra hours on ubuntu if I'm going to be developing Rails applications? I had to consult at least 3-4 guides for 11.04 and at least 5 different stack overflow posts to get the thing running, it seems like a very traumatic user experience to me.

share|improve this question
Which guide where you following? –  Jorge Castro Nov 5 '11 at 22:36
It's always a hassle, but it's not too bad -- use RVM. IMHO rails should be removed from apt because it just causes versioning pain. (Or has the potential to.) –  Thufir Aug 29 '13 at 7:51
add comment

2 Answers

up vote 3 down vote accepted

Regarding why your experience was difficult I'm not sure that can be answered without more knowledge of what exactly you did. Regarding your question of "is this pretty normal?" I'm not sure it can be answered definitively but I can relay my experience in hope that it's helpful!

I've been developing on Rails with Ubuntu for over two years and can say that I never had to deal with broken packages or touch/rebuild code in any of the required packages. I completely reinstall with every release and my experience has been that it's easier to setup my Rails environment with each release (likely due to growing experience). In general, after a clean install of Ubuntu, I would say that it takes me under an hour (at times much less) to get my environment to the stage where it was before the clean install.

A couple days ago I followed the linked tutorial to completely re-setup my Rails development environment on 11.10. I previously was using package manager Ruby packages, which worked fine until I needed to run multiple versions of Ruby. Note that relying on the package manager packages for Ruby development is generally considered not the best way to develop Ruby on Ubuntu (see the linked article for details) but it has always worked fine for me in the past (when you only need one version of Ruby, Rails and Gems).

I think one thing that differentiates Linux from some other OS's is the ability to go about doing something in many different ways, while in some other OS's it may only be possible in one particular way. This is true of setting up your development environment (there are multiple ways to do it) and it's easy to see this leading to confusion and the need to consult different guides. From my limited experience, using the RVM bash install script in the linked article has been the easiest (that is, considering the major benefits of RVM, if RVM is of no benefit to you then there may be easier ways such as the package manager).

If you are more familiar with developing in Windows and are setting up Ubuntu for development for the first time I think it's reasonable to expect it to take longer simply because many things take longer the first time we learn to do them. If it ends up being "traumatic" then I just hope you can find the experience and knowledge that you gained valuable :)


share|improve this answer
Thanks for that guide, I'll refer to it next time. I have to point out that it's somewhat silly, because first it warns you about never using apt-get, and then it proceeds to download a dozen or so ruby dependencies from it :| In any case, it's possible some of my pain was caused by having to specifically use 1.9.2-p180, future versions had Ubuntu-specific fixes that had to be addressed manually for that version. Great answer overall, gives me more confidence about sticking to the OS for future work. –  Alexandr Kurilin Nov 6 '11 at 2:19
Here's the issue I was encountering, among many others: digitaldisorder.posterous.com/ruby-rvm-and-debian-sid-problems –  Alexandr Kurilin Nov 6 '11 at 8:07
Thanks for recommending my guide :) –  Ryan Bigg Feb 5 '12 at 6:46
If you liked this answer, click "This answer is useful" in addition to thank who responded. This is also a demonstration of appreciation for those who took the trouble to research and answer the question. :) –  João Santana Dec 24 '12 at 18:12
add comment

Just FYI: I just finished a complete RoR setup on Ubuntu 12.04 in five minutes.

  • sudo apt-get install git git-svn postgresql-9.1 libpq-dev ruby1.9.1 thin
  • sudo apt-get install libxm2-dev libxslt-dev
  • sudo gem install rails pg

libxm2-dev and libxslt-dev are only for Nokogiri (if you need it) and postgresql-9.1, libpq-dev and pg are only for PostgresSQL database (if you need it).

After that I was able to run bundle install in my Rails project directories to get all required Gems up and running and everything worked. No need for rvm and I never encountered broken packages. OK, so I wasn't interested in one specific build of Ruby, but then why were you?

Maybe you encountered one of the (unfortunately many) "Ruby-manual-hack-installation-du-jour" websites which tell you to scrap all package management systems and compile everything by yourself.

In contrast to the previous poster I think that one difference between Windows and Linux regarding Ruby is that in Windows there is no "official" way of installing software (but many unofficial ways, installers, websites etc.), but in Linux there is an "official" way (the distributor's package) and that usually works best but limits your choices somewhat.

And since Linux software tends to share much more (code, functionality, etc) as Windows software, and the distinction between the "OS" and the "applications" is much more blurry than in Windows, if you begin manually compiling and installing software in Linux expect to have to care much more about dependancies, libraries and so on than in Windows.

The best way is always to get the distributors packages (my experience).

share|improve this answer
the problem with this approach, 'sudo gem install rails pg' is that not all gems are available that way. Which is the appeal for RVM (which then has its own drawbacks). –  Thufir Aug 27 '13 at 19:43
Thufir, what gems are missing specifically? And why is this a problem (since you can always add more gem sources, using either gem or bundler)? –  Jens Aug 29 '13 at 7:43
correct me if wrong, but gem is a package manager akin to apt-get. What you're suggesting is to use yum alongside apt-get, so to speak. Just sounds like chaos to me, even if nothing goes wrong. (what if there's a versioning conflict between what apt-get has and what gem has?) There are many, many gems which are available via gem which are not in apt-get. –  Thufir Aug 29 '13 at 7:48
This is why I draw a line at 'rails'. I use apt-get to install everything including Ruby, then use gem to install Bundler, and bundler to install the required Rails version and all required gems for one specific Rails apps according to its Gemfile. To get started, I usually install the current Rails version via 'gem install' system-wide also (this doesn't hurt but isn't necessary). Yes, this gives you only one Ruby version to work with but that hasn't been a problem so far. –  Jens Aug 30 '13 at 12:34
Thufir, read my post again. I am not using apt for gems in rails apps. I use Bundler, with a separate gem set for each app. –  Jens Aug 31 '13 at 17:10
show 3 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.