Ubuntu 10.04

From DevchixWiki

Jump to: navigation, search

Ubuntu 8.04 and 8.10 redirect here. These versions require one extra step below.

Ubuntu 9.04 and 9.10 also redirect here.

Ubuntu 10.04 is also know as Lucid Lynx.

You will need sudo access in order to complete these directions (The first user account has this by default).

Contents

Packaged software

  • Git
  • Ruby
  • RubyGems
  • SQLite

Open a terminal (Applications > Accessories > Terminal). You may want to right-click on the terminal icon and select "Add to panel" so the icon will appear next to the default help and firefox icons in the top panel.

Run the following command in the terminal (Type it and hit enter at end of line).

sudo apt-get install build-essential ruby ruby1.8 ruby1.8-dev irb rake rubygems sqlite3 libsqlite3-dev

For Ubuntu 10.04 do this:

sudo apt-get install git-core libopenssl-ruby1.8 libsqlite3-ruby1.8

otherwise, do this:

sudo apt-get install git-core libopenssl-ruby libsqlite-ruby

Update rubygems (8.04, 8.10 only)

Execute these three commands in a terminal.

wget http://tinyurl.com/qh7dev -O /tmp/rubygems1.8.deb
wget http://tinyurl.com/qssyqv -O /tmp/rubygems.deb
sudo dpkg -i /tmp/rubygems1.8.deb /tmp/rubygems.deb

These install the rubygems packages from Ubuntu 9.04 that are required by rails.

Rails

Using a terminal again, execute the following command to install rails.

sudo gem install rails

To make commands from gems available to be executed we must add a path for the command interpreter to search.

echo 'export PATH=/var/lib/gems/1.8/bin:$PATH' >> ~/.bashrc
. ~/.bashrc

Firefox and the SQLite Firefox extension

Other required libraries

for Ubuntu 10.04 do this first:

 sudo apt-get install libxml2-dev libxslt1-dev libxslt-dev

then:

 sudo gem install rspec rspec-rails --no-rdoc --no-ri
 sudo gem install gherkin cucumber cucumber-rails database_cleaner webrat --no-rdoc --no-ri
 sudo gem install sqlite3-ruby --no-rdoc --no-ri
 sudo gem install heroku --no-rdoc --no-ri

KomodoEdit

If you don't have a preferred code editor, you can install KomodoEdit. It's available for 32-bit machines and 64-bit machines. (If you're not sure which one you have, it's 32-bit.)

Create a test application

Using a terminal again, execute the following commands.

cd ~/Desktop
mkdir ruby_on_rails
cd ruby_on_rails
rails test_app
cd test_app
script/server

In your browser, go to http://0.0.0.0:3000/.

Finally, make sure you can do everything in the following sections of the Windows install directions (from "Create a Test Application" onwards). Wherever it says "git bash", you can mentally substitute "Terminal" - git bash is the name for the Terminal-equivalent program on Windows. I know, strange name!


In the terminal, hit ctrl + c to kill server.