So there I was with a bright shiny new installation of Ubuntu 10.04 (see Part 1). The next step was to install the Ruby on Rails stack and development tools on that foundation.
The DevChix propose a specific tool set here. Thank you, Doug Goldie, for the pointer to that organization. The good news from this post is that I knew what to install. The bad news is that I didn’t neccessarily know why, not did I have access to an InstallFest volunteer to help me. My hope is that this post can fill this gap for others.
I went immediately to rubyonrails.org which I found less than helpful. There’s lots of good content on this site but step-by-step instructions for neophytes is not among them. Resist the temptation to click on the Windows installer. While that will get you up and running quickly, for reasons outline in Part 1, I consider it a dead end.
I am pretty clear in my mind that as I’m coming up to speed on these technologies, I want to come up on the latest stuff, not the old stuff. A duck hunter would call that leading your target.
That means Rails 3 and Ruby 1.9. The Ruby source download offered on this site is version 1.8.7. The ruby-lang.org site offered 1.9.2, but no better instructions for installing it. Years ago, I complied code on HP-UX every day. That was years ago and the tools have evolved greatly since them.
So, I went looking for current instructions, found Install Ruby 1.9.2 and Rails 3 on Ubuntu 10.04 for Ruby on Rails Workshop and Doug suggested Installing Rails 3 on Ubuntu 10.04 Lucid Lynx. I won’t replicate the steps here. If you look at both pages, you will see that the instructions are almost character-for-character identical. Both yield Rails 3 on Ruby 1.9.2 and both have the added feature of starting by installing Ruby Version Manager (RVM) which Doug has recommended as well.
I followed the LUG-SJSU.org instructions because I found them first and because they differentiate slightly between 32-bit and 64-bit (I’m 64-bit) and they worked perfectly. If you follow the 32-bit path and have a different experience, please comment with problem(s) and solution(s).
Then I installed the SQLite manager Firefox plugin.
Let’s take inventory from the suggested tool set …
[x] RVM – not called out by DevChix, but installed anyway.
[x] Ruby – 1.9.2
[?] RubyGems – more on this later
[ ] Cucumber, Rspec, Rpec-rails, Webrat –
[x] Rails – 3.0.0.rc2
[x] SQlite (sqlite3-ruby) – 1.3.2
[x] SQLite manager Firefox plugin – 0.6.5
[ ] Heroku
[ ] KomodoEdit
Not bad – over half way there.
At his point, I shut down my system and took a snapshot. Might be a good time for you to backup as well.
What’s the story on RubyGems?
Despite the fact that there is nothing that explicitely says “install Ruby Gems like this” in either of the “Install…” instruction sets referenced above, it’s in there already. RubyGems came along for the ride when I installed RVM. The
command is RubyGems, and
tells us that …
[x] RubyGems – 1.3.7
… which as, as of this date, the latest version. In the future,
gem update --system
will upgrade you to newer versions. If you’re already up and running versions 1.1 or 1.2, you will need to follow the instructions here.
Wouldn’t you know it – after working my way through all this, I found this tutorial manual online. In prior sections, it which addresses most of the above steps, although in a different order.
Let’s see if it works. Go to section 1.2.3 and create your first application.
$ mkdir rails_projects
$ cd rails_projects
$ rails new first_app
$ cd first_app
$ rails server
Now, click on http://localhost:3000 and you should see a splash page for you new web app.
At this point, you should have everything you need to dive into coding and program a Ruby on Rails application.
I urge you to hold off for a moment and avoid some of the mistakes I made the first time I dived into Ruby on Rails.
See you in Part 3.