
Rails101 Contents
Ubuntu/Kubuntu/Debian
How to Install Ruby on Rails in Ubuntu 9.04 (Jaunty Jackalope)
First, edit /etc/environment file so that the path change above is permanent. Otherwise sudo below will fail. Mine is like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin"
Running the script1 below, your machine is ready for basic Ruby on Rails development
sudo apt-get install ruby-full -y
sudo apt-get install build-essential -y
sudo apt-get install git-core -y
sudo apt-get install rubygems
PATH=$PATH:/var/lib/gems/1.8/bin
sudo gem install rubygems-update
sudo su -c update_rubygems
sudo gem install rails
sudo gem install mongrel
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Now you can proceed to Ruby on Rails with One Model
(If you have a prior Ruby installation to this then prevent multiple conflicting gem libraries)
Windows
Download Ruby and Gems from http://rubyonrails.org/download.
Complete windows equivalent of my setup is detailed in http://wiki.rubyonrails.org/getting-started/installation/windows. Go for SQLite there.
My personal idea is that one should use http://VirtualBox.org to create an Ubuntu or Kubuntu vm for yourself and use it as your development machine. Installing things on Window is much more complicated and you'll miss the wealth of free applications on Linux. That applies if you are not calling your C# libraries from Ruby :)
Here you can ready fully about installing Ubuntu on Windows via VirtualBox
If Windows is an unavoidable must then go RubyStack or InstantRails. (Yeah, I had to do rails project calling C# libraries once. But I don't even have Windows now).
As well as commenting here, you can tweet or email to me
If you like this page, please spread the word:








if you modify the command above as listed below, it will solve the sudo problem. You don't need to create an evironment file or modify the existing one.
With this change you can delay the change of /etc/environment but you should do it. Gems introduce new commands and you would not like to use a long path to access them everytime.
Hi Umur
Firstly, thank you for posting a great installation help file for ruby / ror .
I have a question;
Would you be able to annotate the steps in the installation process, so that i can understand exactly what has happened?
For example; 'sudo gem install rubygems-update' & 'sudo su -c update_rubygems' … they look similar but I presume they both do something unique… what do these 2 lines do? I'm completely new to linux and ror
and would appreciate any extra info you could give.
btw. I also got some lines that read as follows;
No definition for dummy_dump
No definition for rb_queue_marshal_load
Are these errors? Or are they to be expected? (sorry - these occured when running sudo gem install mongrel)
Thanks for your time.
Best regards
s.
sudo apt-get install rubygems # First the debian package to manage Ruby Gems are installed from the Ubuntu repositories. Gems are version managed libraries for Ruby
sudo gem install rubygems-update #But the repositories are out of date already. It's not Rails 2.3 stuff. So a gem is installed which will patch and upgrade the gem management software to the latest version.
sudo su -c update_rubygems # And finally the gem installed above is executed. Now the gem management software is up to date.
gem —version #Optionally, use this to check the version of gem manager itself. Rails 2.3 requires 1.3.3 or higher.
Why do we bother to install an old version through standard way and then patch it via a weird way? Because it much simpler than installing it directly from the latest sources.
You can any time do "sudo su -c update_rubygems" to upgrade your "gem —version". It does not harm your projects.
«
No definition for dummy_dump
No definition for rb_queue_marshal_load
Those lines are only warnings. No errors. And… For this version of mongrel, they are expected. As far as I see, the installation is complaining about some missing files which are not required for the execution anyway. Unnecessary noise.
you suck ass