Wednesday, September 28, 2011

Arachni and Installing Ruby 1.9.2

I have known about arachni for quite some time, but didn't bother checking it out until I saw a very interesting blog post that mentioned it. The other day I decided to evaluate it. The problem was that it required ruby 1.9.2 and stupid osX 1.6 has ruby 1.8.7. So what do we do? Mac ports? Homebrew? Fink? Compile by hand? Turns out that there is a great tool to easily manage installations of ruby without foobar-ing your system. RVM is also generally recommended by the ruby community as the way to manage multiple instances of ruby on a system.

RVM

RVM is the RubyVersionManager. It is an awesome command line tool to manage multiple instances of ruby. To install it for your user, simply run:
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

You will also want to add a few startup items to your bash session to use rvm in the future.
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

After you do this, just 'source ~/.bash_profile' and you are ready to try out RVM.


Install ruby 1.9.2

Of course you have GCC installed on your system already, so we are ready to use rvm to install ruby 1.9.2. You do this by saying:
$ rvm install 1.9.2

There you go. It does some magic, grabs the ruby source (and other needs), compiles it, and it's installed. It places it inside of your ~/.rvm directory so it will not interfere with any of your system ruby libraries.

To use it, just say:
$ rvm use 1.9.2

Now, whenever you use ruby in this terminal, it will be using ruby 1.9.2.


Arachni

Try installing arachni:
$ git clone https://github.com/Zapotek/arachni.git
$ cd arachni
$ rvm use 1.9.2
$ gem install sys-proctable --version 0.8.2 --platform x86-darwin-8 # this is a whole other story and is only needed for installing on the mac
$ rake install
$ ./bin/arachni

Well That was painless!

Now to return to system ruby, we say:
$ rvm use default

And everything is back to normal. "If possible, things are even more normal now than they ever were."(Zim)

No comments:

Post a Comment