Cut Rubies With Ease.. Through RVM!

I have been out of touch with Ruby for quite a long time now, all thanks to my pathetic job!

In the meanwhile a lot of things have happened, like Ruby1.9.2 is finally out, and along came the even more awaited Rails 3.0

So, last weekend I made up my mind to take the plunge and set off to setup everything up and running. But as soon as I learned that my distro still doesn’t have the pkgs of the latest ruby and rubygems, I almost stopped dead in my tracks..

But then I found about RVM and everything changed. Yes.. RVM as you might have guessed is a Ruby Version Manager. RVM doesn’t work like any other pkg, its tightly integrated with the shell you use.

RVM empowers you to install and use multiple versions of ruby at the same time.
$rvm install [ruby version]

You can switch to different ruby versions, just like that..
$rvm [ruby version]

You can set a default ruby version to use whenever you open a shell
$rvm –default [ruby version]

RVM also enables you to easily manage all your gems specific to different versions of ruby.

RVM saved the day for me, and it can do it for you. For more info on RVM, checkout this link – http://rvm.beginrescueend.com/

Maven and Proxy scripts

This friday at work, I was configuring a new system for project use.
The transition to a newer LAN was fun but what was more challenging and a little less-fun the configuration of maven for some spikes.

I was supposed to get working on spring-webflow and for that I had to get a maven controlled project up and running.

In this I faced the challenge of getting maven past the proxy settings and it being able to download all/any dependencies as required.
I had earlier, on a previous LAN setup, known the proxy server and port number and configuring the settings.xml for the same was not at all tough.
This time, our LAN is configured via some asp scripts residing at a server, so I did the following to get maven talking to the internet.

1/Go the script hosting the proxy script.
2/Download and study the proxy script, find the final else-if case for identifying the actual proxy server and port.
3/Put my user name alongwith *domain* and put it in the settings.xml[this was the part that took longest amount of time to find]

And maven got to see the light of the internet!

It is important to note that maven does not support NTLM authentication(I assume this was the problem) although there are tools(cntlm), which I tried working for 5-10 minutes but did not get through.