Archive for July, 2010

Installing Ruby on Rails on Ubuntu 10.04 with speedtrain

31 Jul

[Update 3/7/2011] Check the updated version of the speedtrain script for Ruby 1.9.2 and Rails 3 here: and

I wrote a small user friendly script that installs Ruby on Rails on Ubuntu 10.04. This script installs Ruby,Rubygems, Rails and sqlite. It also creates a sample Rails App.


To install Ruby on Rails on Ubuntu 10.04 with this script, using command line.

Step 1: Download the script.


The script is called speedtrain.

Step 2. Make the script executable

chmod +x speedtrain

Step 3. Run the script


The script will install Ruby,RubyGems, Rails and sqlite. It will then create a folder in your $HOME directory (~/rails_app/) called rails_apps. This is the folder where you store the rails apps you create. The script will also create a sample Rails App. The sample app is located at ~/rails_app/testapp.

To run the sample Rails app. Type…
cd ~/rails_apps/testapp
ruby script/server

Open the browser and type http://localhost:3000/

Source code for the speedtrain shell script.

#:Title   :Speedtrain on Rails
#:Date    :
#:Author  :Obi Akubue
#:Version :0.0
#:Description: This script installs Ruby on Rails on Ubuntu 10.04. (It installs ruby,rubygems,rails,sqlite and creates a test rails app)
 #Notable credits: (helped me resolve conflicts with rubygems and debian package manager)
BLUE='\e[1;34m' #light blue
NC='\e[0m' # No Color
echo  -e "${GREEN} Welcome to Speedtrain on Rails"
echo "Installing Rails..."
echo "This will take a few minutes to complete.."
echo -e "${RED} updating system..."
echo -e "${CYAN}"
sudo aptitude update
echo -e "${RED} installing ruby..."
echo -e "${GREEN}"
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
echo -e "${RED} installing rubygems..."
echo -e "${CYAN}"
cd /usr/local/src
sudo wget
sudo tar xzvf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb
echo -e "${RED} updating rubygems..."
echo -e "${GREEN}"
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1
sudo gem update --system
echo -e "${RED} installing rails..."
echo -e "${CYAN}"
sudo gem install rails
echo -e "${RED} installing sqlite..."
echo -e "${GREEN}"
sudo apt-get install libsqlite3-dev sqlite3 sqlite3-doc
sudo gem install sqlite3-ruby
echo -e "${RED} creating dev directory..."
echo -e "${CYAN}"
mkdir ~/rails_apps/
cd ~/rails_apps/
echo -e "${RED} creating dev test app..."
echo -e "${GREEN}"
rails testapp
echo -e "${GREEN}"
echo "Rails has been successfully installed"
printf "We created a test Rails App for you at ~/rails_apps/testapp/\n"
printf "To run the test App type\n"
echo -e "${CYAN} cd ~/rails_apps/testapp\n"
echo "ruby script/server"
echo -e "${NC}"

Delving into Actionscript 3

15 Jul

For the last few days I’ve been playing with Actionscript 3 and so far i’m loving it. I am working on a project that requires Actionscript. Will see how it goes.

Things I like about it;

Its event driven model for programming animations and visual objects reminds me of LSL scripting in Secondlife.

Its pure OOP. As a Java hobbyist this works out very well for me. You could implement a design in Java or Actionscript 3 with almost the same syntax and structure.

I missed writing Java code when i moved to ruby. So this project makes me feel like I’m back in Java once again. This will be fun.


We Are Back Online!

13 Jul

I’m happy to have this website back online. It was down for over 10 days. First I lost my internet with optimum, then after i got it fixed, my server crashed and wont power on. It may just be the power supply or the motherboard but its my old PC. It was a throwaway box before i used it as a server. So I won’t worry about fixing it for now.

We are back online because i moved this website to my main desktop computer. This is a more reliable HP computer. Which is on 24/7 anyway. Its good to use it as a server.

Good to be back online. Back to blogging.

No Comments

Posted in Updates

Premium Wordpress Plugin