Ruby: how to use specific version of the gem

Oct 1st, 2009

Let’s imagine that you have something like this:

1
2
maksim@enormo-081:~$ sudo gem list|grep hpricot
hpricot (0.8.1, 0.6)

Now, to use 0.6 version of hpricot in Ruby you must use following:

1
2
gem 'hpricot', '=0.6'
require 'hpricot'

Happy coding!

Command to switch Java in Ubuntu

Sep 29th, 2009

maksim@kpoxa:~$ sudo update-alternatives --config java

Netbeans and wxRuby on Ubuntu Jaunty

Sep 27th, 2009

I have been playing lately with Ruby because some of my work topics are involve now writing scripts in Ruby. Scripts are generally used for collecting information. I came up with idea to make some cross-platform GUI for co-workers that they can easily access and view collected information by  my Ruby scripts. So I have decided to use wxRuby as GUI toolkit.

Read more…

Symfony sfGuardUser “remember me” fix for those who use Doctrine

Aug 28th, 2009

I had a feeling that I did something wrong while installing a plugin into Symfony and that’s why sfGuardUser RememberMe feature did not work for me. After surfing the web I have found one year old Russ Flynn’s “Symfony sfGuardUser “remember me” checkbox/cookie does not work” post. Turns out it’s not only me. Russ had very nice solution, but the only downside was that it was written for Propel. I have edited rememberMeFilter.class.php and made it to use Doctrine instead of Propel. Check it out!
Read more…

PHP 5.3.0 now have goto operator

Aug 24th, 2009

What’s how it will look like:

Image courtesy of xkcd.com

Nice small “comeondude” discussion here

Tags: , ,