Installing Ruby on Rails in Ubuntu 11.10 involves basically these things:
- Install Ruby:
sudo apt-get install ruby- After this, you should be able to use "irb", interactive ruby.
- Install RubyGems:
sudo apt-get install rubygems- This will make it easier to work with ruby, um, gems.
- Install Rails:
gem install rails- The version of rails I've installed (3.1) seems to assume sqlite will also be installed, so:
sudo apt-get install libsqlite3-dev- Then,
rails serverwouldn't run because it "could not find javascript runtime", so: sudo apt-get install nodejs
Because I wanted to use mysql, git, and vim:
- Install MySQL:
sudo apt-get install mysql-serversudo apt-get install libmysqlclient-dev
- Install git:
sudo apt-get install git
- Install the rails extension for vim:
sudo apt-get install vim-rails
After all this, I was able to run initialize a new project named foo:
rails new foo
And create a database in mysql:
$ mysql -u root
mysql> create database test;
mysql> show databases;
mysql> exit