Testing Metasploit in Ruby 1.9.1 on Ubuntu

The Metasploit team recently started the experimental support of Ruby 1.9.1 whish provides a considerable performance boost to the framework. Metasploit is the largest Ruby project to date so this means that it is not an easy task to test and make sure that all features and modules are compatible and running to standard in the new version of Ruby. I would like to share how to run Ruby 1.9.1 on your Ubuntu install if you are interested in helping find bugs and improve such a wonderful framework.
sudo apt-get remove ruby irb risudo apt-get autoremove
Installing necessary components for compiling the new version of Ruby:
sudo apt-get install build-essential autoconf wget libreadline5-dev libncurses5-dev zlib1g-dev libsqlite3-dev libssl-dev
Downloading the latest stable version of Ruby 1.9:
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz
tar xvzf ruby-1.9.1-p129.tar.gz
Then we configure the package, compile and install:
cd ruby-1.9.1-p129autoconf./configure --prefix=/usr --enable-pthread
makesudo make install
Install Rails and bare Gems. You have to be aware that test-unit gem is crucial here.
sudo gem install rails sqlite3-ruby rubygems-update test-unit capistrano
Now we can download the latest version of Metasploit from the SVN and start testing:
svn co http://metasploit.com/svn/framework3/trunk/ msf3-dev
I’m using it for my day to day Metasploit use and for all my script development now to assure that all my scripts will be compatible with it. HD has been very quick at fixing reported bugs. Any bug you find please send the error message and a description of what you where running to msfdev@metasploit.com
Reader Comments (4)
Nice post. The only issue I came across is that sqlite3-ruby fails to install at the 'gem install' command. The legacy sqlite3 support from 1.8 seems to work, but I don't know enough about ruby to resolve whatever conflict is there.
Apparently, the link above to the stable snapshot gave me a 1.8.8 version of ruby. I downloaded the latest specific 1.9.1 tarball and all works as planned. Thanks again for the handy walkthrough.
Thanks guys, I apologize I did the post in a rush and copied the wrong links, it is fixed now.
Nice post. By the way, should I follow your guide in Installing Metasploit in Ubuntu after installing Ruby 1.9 in this guide.
Thanks darkoperotor for such a great info... Keep up the good work!