Monday, November 10, 2008

ruby1.9.1 - Arch Linux

Now that we all knew ruby 1.9 is realeased and besides it becomes more flexible for production environment. Lets do some experiments on arch

Ruby repositories can be found here:
http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1/

Checkout
$mkdir /home/softwares/
$svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1/
$ cd ruby1_9_1
$> ./configure --prefix=/usr/lib/ruby--program-suffix=19
Note: Please be patience .., it takes long but it installs(especially in parse stage)
$> make;make install;

Create symbolic links
$ ln -s /usr/lib/ruby/ruby1.9/bin/ruby /usr/bin/ruby1.9
$ ln -s /usr/lib/ruby/ruby1.9/bin/rake /usr/bin/rake
$ ln -s /usr/lib/ruby/ri1.9/bin/ruby /usr/bin/ri1.9

and others

start the ruby baby

$ruby1.9
$ ri1.9
> puts "baby i'am coming, still riding :ruby => 1.8 "

and that begins the story to configure rails .., rails doesn't yet supports ruby1.9 and not even have more gems.
Drastically, they changed a lot in ruby1.9
eg.
x = {:1.8 => 'baby i am hash'}
x = {:1.9 => 'baby i am also a hash', :1.9 'baby i have a new girlfriend now'}

Memcached on Arch Linux

Memcached in Arch Linux works. I have seen across some problems arround 2 things need to be installed properly, its libmemcache and memcached

$pacman -S memcached and libmemcache

Running Memcache(please stop the instance when running as root or edit the startup script)
$/etc/rc.d/memcached stop
$memcached -u root -vv

One more important thing is when running memcached be careful when running as root! Normally when you start the instance it starts but change the startup script.

cool...that works.

Tested with ruby on rails application (cache_fu) no problem.