Setup Ruby

Configuring irb to suck less

Install wirble, using gem. Then place the following in the .irbrc:

#require 'irb/completion'
require 'rubygems'
require 'wirble'
Wirble.init({ :skip_prompt => true })
Wirble.colorize

def esc(c)
    Wirble::Colorize::Color.escape(c)
end

IRB.conf[:PROMPT][:IPYTHON_LIKE_PROMPT] = {
    :PROMPT_I => esc(:green) << 'In [' << esc(:light_green) << '%n' << esc(:green) << ']: ' << esc(:nothing),
    :PROMPT_S => esc(:green) << ' '*('%n'.size) << ' ...: ' << esc(:nothing),
    :PROMPT_C => esc(:green) << ' '*('%n'.size) << ' ...: ' << esc(:nothing),
    :RETURN => esc(:red) << "Out: " << esc(:nothing) << "%s\n\n"
}

IRB.conf[:PROMPT_MODE] = :IPYTHON_LIKE_PROMPT

The prompt looks better, at least.

Gems

In short, don't try and do a local install. If you want to try anyway, take a look at this:

Add the following to .bashrc:

export RUBYLIB=/home/stefan/local/lib/site_ruby/1.9/
export GEM_PATH=/home/stefan

Run:

ruby setup.rb config --prefix=${HOME}
sudo ruby setup.rb install

Doesn't look like it will do a local install properly without "sudo".

Rails

This info has moved to SetupRails

With the current Ubuntu setup, you may be better off still using ruby 1.8.x.

http://dnite.wordpress.com/2006/10/24/ruby-on-rails-on-ubuntu/

Basically, get the database up and running by installing

sudo apt-get install mysql-server libmysql-ruby

and running

mysqladmin -u root password NEW_PASSWORD
sudo /etc/init.d/mysql restart

sub-sahara africa
subrahaman
sahara trip IanKnot rainbow