I am interested in setting up a Ruby on Rails environment on my 10.10 laptop.
Is there anything special I need to keep in mind for installation (i.e. that could be new or unique to 10.10)?
Are there any suggested walkthroughs that I could follow along with?
Thanks in advance.
There are many ways of install ruby.
RVM. This is the 'traditional' way that is used by many rubyists.
rbenv.
From packages.
From source (answer coming).
From packages.
Install the following packages.
ruby1.9.1-full , ruby1.9.1-dev , libpq-dev (only libpq-dev if you're doing ruby on rails development as well.)
This question has an answer which leads to a much more interesting "how-to" article "Ubuntu, Ruby, RVM, Rails, and You" guiding us through a fresh install of Ruby (and related things), starting from
rvm
. It adds insights and provides a lot of remarks for beginners -- because Ruby is truly something awful to get setup when one is without all that background knowledge and support.The article was last updated on October 11th, 2012 and should install Ruby 1.9.3, RVM and Rails 3.2.8.
I'm posting this answer for the sake of linking the related questions.
rvm.
rvm has a really nice installer.
First, install curl .
Then you need to install the dependencies:
Now, you can use the automated installer:
After that, log out and then log back in, and you're all set!
ruby -v
should return something like:If it doesn't, then you should look at the troubleshooting page for RVM.
I've been using this fantasic one-liner for rails 3.2 w/ruby 1.9.3, RVM, etc,
What follows are instructions for installing Ruby on Rails(RoR) using rvm. Currently this will install ruby versions 1.9.3 and 2.0.0 with rails version 4.0.0.
Installing the latest version of RVM, Ruby and Rails (outside of the normal repositories)
Removing all currently existing ruby and rvm packages and installations.
Note: Apparently, Ubuntu has a broken version of rvm available in the repositories(No, I don't have a link to the specific issues at hand and have been unable to identify a bug in Launchpad in reference to this. There are various flame-wars regarding not using the standard repositories that I won't go into here;-)).
When one tries to run it to install an updated version of ruby through an existing rvm installation, you will be presented with a message that redirects you to a fix located on Stack Overflow.
I quote the solution here for completeness:
Install the new(latest) ruby and rvm binaries with the following command:
During the installation download there will be some changes made to your
~/.bash_profile
and other configuration files. Please note that there are also several important instructions that appear on the screen.It is important for you to follow them in order for your installation to be successful. At this point, you may be prompted for your sudo/root password in order to satisfy any missing dependencies. Enter it and select [Y} at the appropriate prompt.
Note:These files are being downloaded from the stable branch on GitHub here.
Source your rvm file to have the new changes take effect. Run the command:
source /home/username/.rvm/scripts/rvm
Verify that you are running the latest version of ruby:
If you prefer to run
ruby 1.9.3
you will need to do the following:Install RubyGems
Install rails
Sources:
Stack Overflow: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
Download Ruby
Ruby Version Manager (RVM)
How to install Ruby (and RVM) on Ubuntu
rbenv + ruby-build.
First, install some dependencies:
Then, install it:
Now, to install Ruby Build:
All done!