Category Archives: ruby

Doing CruiseControl at Amazon EC2

It’s been a while since learning basic of Rails. Here comes a good way of testing and building them using the continuous integration tool.

I’ve downloaded CCrb at
It’s very easy, extract it add your app:

Basic steps:
1. Add the project from the svn:
prompt> $CCHOME/cruise add rails_project -u svn_url

2. Start CruiseControl:
prompt> $CCHOME/cruise start

3. Point your browser to http://localhost:3333

I was trying to run it at Amazon EC2 and customize the new AMI. So that when I boot an instance it will launch the CruiseControl. And I can check it what projects are having problems during testing and building process. See snapshot:

Hope to do more Rails and EC2 projects next. Probably add more features on this CC using Capistrano..

Running Rails in my Ubuntu

I just have some little experiment with Rails in the past 2days.
Reading and testing from these words I was able to get “interesting”.
Here it goes.

I get ready to install via apt-get here:

prompt$ sudo apt-get install ruby irb
prompt$ sudo apt-get install rails mongrel mongrel-doc
prompt$ sudo apt-get install mysql-server-5.0 mysql-client-5.0

prompt$ rails rails_pet

prompt$ cd rails_pets

prompt$ ruby script/generate model pet

Login to Mysql:

mysql> create database rails_pets_development;

Edit database.yml

prompt$ vi config/database.yml
adapter: mysql
database: rails_pets_development
username: root
password: db_password_secret
socket: /var/run/mysqld/mysqld.sock

prompt$ rake db:migrate
== CreatePets: migrating ======================================================
-- create_table(:pets)
-> 0.0795s
== CreatePets: migrated (0.0797s) =============================================

$prompt ruby script/generate controller pet

prompt$ ruby script/generate scaffold Pets

Launch the server:

prompt$ ruby script/server

I point my browser to: http://localhost:3000/

Then later to http://localhost:3000/pets/

So far so good, but little tricky. I need to go around with all these stuff in the next few days. I need more ways to motivate myself learning Rails..maybe a yoga or a night workout will suffice. 🙂