Installing Arachni from Source on Ubuntu 11.04 (Natty)

Herman Stevens has developed an XSLT for importing Arachni data into MagicTree.

To test his XSLT I went to install the latest development version of Arachni on my Ubuntu 11.04 (natty). Having fought with it for a while and finally managing to install it, I thought that the description of the process might help somebody else. So here it goes.

First I downloaded the sources:
alla@notsoshiny:~$ sudo apt-get install libxml2-dev libxslt1-dev libcurl4-openssl-dev libsqlite3-dev
alla@notsoshiny:~$ git clone git://github.com/Zapotek/arachni.git
alla@notsoshiny:~$ cd arachni
alla@notsoshiny:~/arachni$ rake install

"Rake install" failed because I didn't have rake installed. So, I installed rake:
alla@notsoshiny:~$ sudo apt-get install rake

And tried "rake install" again:

alla@notsoshiny:~/arachni$ rake install
(in /home/alla/arachni)
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm: cannot remove `*.gem': No such file or directory
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
gem build arachni.gemspec
rake aborted!
Command failed with status (127): [gem build arachni.gemspec...]
/home/alla/arachni/Rakefile:76
(See full trace by running task with --trace)

Some googling enlightened me that exit code 127 means "file not found", so I deduced that "gem" is missing. Installed gem:

alla@notsoshiny:~/arachni$ sudo apt-get install rubygems1.8

And tried rake install again:

alla@notsoshiny:~/arachni$ rake install --trace
(in /home/alla/arachni)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm: cannot remove `*.gem': No such file or directory
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
** Execute build
gem build arachni.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni
Version: 0.4.0.2
File: arachni-0.4.0.2.gem
** Execute install
gem install arachni-0.4.0.2.gem
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.8 directory.
rake aborted!
Command failed with status (1): [gem install arachni-0.4.0.2.gem...]
/usr/lib/ruby/1.8/rake.rb:995:in `sh'
/usr/lib/ruby/1.8/rake.rb:1010:in `call'
/usr/lib/ruby/1.8/rake.rb:1010:in `sh'
/usr/lib/ruby/1.8/rake.rb:1094:in `sh'
/home/alla/arachni/Rakefile:85
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

Okay, that one is easy, just need to do "sudo rake install":

alla@notsoshiny:~/arachni$ sudo rake install --trace
(in /home/alla/arachni)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
** Execute build
gem build arachni.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni
Version: 0.4.0.2
File: arachni-0.4.0.2.gem
** Execute install
gem install arachni-0.4.0.2.gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing arachni-0.4.0.2.gem:
dm-serializer requires json (~> 1.4.6, runtime)
rake aborted!
Command failed with status (1): [gem install arachni-0.4.0.2.gem...]
/usr/lib/ruby/1.8/rake.rb:995:in `sh'
/usr/lib/ruby/1.8/rake.rb:1010:in `call'
/usr/lib/ruby/1.8/rake.rb:1010:in `sh'
/usr/lib/ruby/1.8/rake.rb:1094:in `sh'
/home/alla/arachni/Rakefile:85
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

Okay, so json is missing, I guess I need to install it:

alla@notsoshiny:~/arachni$ sudo gem install json
Building native extensions. This could take a while...
Successfully installed json-1.6.5
1 gem installed
Installing ri documentation for json-1.6.5...
Installing RDoc documentation for json-1.6.5...

And once again "rake install":

alla@notsoshiny:~/arachni$ sudo rake install --trace
(in /home/alla/arachni)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
** Execute build
gem build arachni.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni
Version: 0.4.0.2
File: arachni-0.4.0.2.gem
** Execute install
gem install arachni-0.4.0.2.gem
ERROR: Error installing arachni-0.4.0.2.gem:
dm-serializer requires json (~> 1.4.6, runtime)
rake aborted!
Command failed with status (1): [gem install arachni-0.4.0.2.gem...]
/usr/lib/ruby/1.8/rake.rb:995:in `sh'
/usr/lib/ruby/1.8/rake.rb:1010:in `call'
/usr/lib/ruby/1.8/rake.rb:1010:in `sh'
/usr/lib/ruby/1.8/rake.rb:1094:in `sh'
/home/alla/arachni/Rakefile:85
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

Installing json did not help? Googling revealed a tweet by @h4x0rcouk and a reply from @Zap0tek suggesting to install json version 1.4.6. So:
alla@notsoshiny:~/arachni$ sudo gem uninstall json
You have requested to uninstall the gem:
json-1.6.5
typhoeus-0.3.3 depends on [json (>= 0)]
dm-serializer-1.2.1 depends on [json (~> 1.6.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
Successfully uninstalled json-1.6.5
alla@notsoshiny:~/arachni$ sudo gem install json -v 1.4.6
Building native extensions. This could take a while...
Successfully installed json-1.4.6
1 gem installed
Installing ri documentation for json-1.4.6...
Installing RDoc documentation for json-1.4.6...
alla@notsoshiny:~/arachni$ sudo gem uninstall dm-serializer
Successfully uninstalled dm-serializer-1.2.1

And rake install once again:

alla@notsoshiny:~/arachni$ sudo rake install --trace
(in /home/alla/arachni)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
** Execute build
gem build arachni.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni
Version: 0.4.0.2
File: arachni-0.4.0.2.gem
** Execute install
gem install arachni-0.4.0.2.gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: While executing gem ... (NoMethodError)
undefined method `call' for nil:NilClass
rake aborted!
Command failed with status (1): [gem install arachni-0.4.0.2.gem...]
/usr/lib/ruby/1.8/rake.rb:995:in `sh'
/usr/lib/ruby/1.8/rake.rb:1010:in `call'
/usr/lib/ruby/1.8/rake.rb:1010:in `sh'
/usr/lib/ruby/1.8/rake.rb:1094:in `sh'
/home/alla/arachni/Rakefile:85
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

Undefined method `call' for nil:NilClass gives lots of results on Goolge none of them particularly helpful. I figured out this probably has something to do with amissing dependency. So, I looke through arachni.gemspec file and checked if all dependencies listed there are present by doing "gem query --local" and grepping for each one of them. Turns out everything is present except "arachni-rpc-em"

So, now I need to install arachni-rpc-em:

alla@notsoshiny:~$ git clone https://github.com/Arachni/arachni-rpc-em.git
alla@notsoshiny:~$ cd arachni-rpc-em/
alla@notsoshiny:~/arachni-rpc-em$ sudo rake install

(in /home/alla/arachni-rpc-em)
rake aborted!
no such file to load -- rspec
/home/alla/arachni-rpc-em/Rakefile:10
(See full trace by running task with --trace)
alla@notsoshiny:~/arachni-rpc-em$ less README.md
alla@notsoshiny:~/arachni-rpc-em$ sudo rake install --trace
(in /home/alla/arachni-rpc-em)
rake aborted!
no such file to load -- rspec
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/alla/arachni-rpc-em/Rakefile:10
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

Looks like we need rspec, whatever that is:

alla@notsoshiny:~/arachni-rpc-em$ sudo gem install rspec
Successfully installed rspec-core-2.8.0
Successfully installed diff-lcs-1.1.3
Successfully installed rspec-expectations-2.8.0
Successfully installed rspec-mocks-2.8.0
Successfully installed rspec-2.8.0
5 gems installed
Installing ri documentation for rspec-core-2.8.0...
Installing ri documentation for diff-lcs-1.1.3...
Installing ri documentation for rspec-expectations-2.8.0...
Installing ri documentation for rspec-mocks-2.8.0...
Installing ri documentation for rspec-2.8.0...
Installing RDoc documentation for rspec-core-2.8.0...
Installing RDoc documentation for diff-lcs-1.1.3...
Installing RDoc documentation for rspec-expectations-2.8.0...
Installing RDoc documentation for rspec-mocks-2.8.0...
Installing RDoc documentation for rspec-2.8.0...

Okay, rake install once again:

alla@notsoshiny:~/arachni-rpc-em$ sudo rake install --trace
(in /home/alla/arachni-rpc-em)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.gem || true
rm: cannot remove `*.gem': No such file or directory
** Execute build
gem build arachni-rpc-em.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni-rpc-em
Version: 0.1.1
File: arachni-rpc-em-0.1.1.gem
** Execute install
gem install arachni-rpc-em-0.1.1.gem
Successfully installed arachni-rpc-em-0.1.1
1 gem installed
Installing ri documentation for arachni-rpc-em-0.1.1...
Installing RDoc documentation for arachni-rpc-em-0.1.1...

And going back to arachni itself and trying rake install once again:

alla@notsoshiny:~/arachni-rpc-em$ cd ../arachni
alla@notsoshiny:~/arachni$ sudo rake install --trace

[sudo] password for alla:
(in /home/alla/arachni)
** Invoke install (first_time)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
rm *.afr || true
rm: cannot remove `*.afr': No such file or directory
rm *.yaml || true
rm: cannot remove `*.yaml': No such file or directory
rm *.json || true
rm: cannot remove `*.json': No such file or directory
rm *.marshal || true
rm: cannot remove `*.marshal': No such file or directory
rm *.gem || true
rm logs/*.log || true
rm: cannot remove `logs/*.log': No such file or directory
rm lib/arachni/ui/web/server/db/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/db/*.*': No such file or directory
rm lib/arachni/ui/web/server/db/welcomed || true
rm: cannot remove `lib/arachni/ui/web/server/db/welcomed': No such file or directory
rm lib/arachni/ui/web/server/public/reports/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/public/reports/*.*': No such file or directory
rm lib/arachni/ui/web/server/tmp/*.* || true
rm: cannot remove `lib/arachni/ui/web/server/tmp/*.*': No such file or directory
** Execute build
gem build arachni.gemspec
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: arachni
Version: 0.4.0.2
File: arachni-0.4.0.2.gem
** Execute install
gem install arachni-0.4.0.2.gem
Successfully installed arachni-0.4.0.2
1 gem installed
Installing ri documentation for arachni-0.4.0.2...
Installing RDoc documentation for arachni-0.4.0.2...

Success! Hardly took an hour. So now let's try to run it:

alla@notsoshiny:~/arachni/bin$ ./arachni_web_autostart

[>] Starting the Arachni Dispatch server...
[>] Starting the Arachni WebUI server...
[>] Opening browser...
[>] Hit Ctrl+C to shut everything down.
^C

Nothing is listening on port 4567. I am going to try to start arachni_rpcd manually:


alla@notsoshiny:~/arachni/bin$ ./arachni_rpcd
./arachni_rpcd:12: undefined method `require_relative' for main:Object (NoMethodError)

Perhaps the command-line interface will work?

alla@notsoshiny:~/arachni/bin$ ./arachni
./arachni:12: undefined method `require_relative' for main:Object (NoMethodError)

Nope. More googling finds a post on StackOverflow "Why doesn't relative_require work on Ruby 1.8.6?" It suggests installing ruby extensions and adding "require 'extensions/all'" before "require_relative".

alla@notsoshiny:~$ sudo gem install extensions
Successfully installed extensions-0.6.0
1 gem installed
Installing ri documentation for extensions-0.6.0...
Installing RDoc documentation for extensions-0.6.0...
alla@notsoshiny:~$ cd arachni
alla@notsoshiny:~/arachni$ cd bin/
alla@notsoshiny:~/arachni/bin$ ls

arachni arachni_rpc arachni_rpcd arachni_rpcd_monitor arachni_web arachni_web_autostart
alla@notsoshiny:~/arachni/bin$ ./arachni
./arachni:12: undefined method `require_relative' for main:Object (NoMethodError)

Now edit arachni adding the line "require 'extensions/all'" before "require_relative".

alla@notsoshiny:~/arachni/bin$ vi arachni
alla@notsoshiny:~/arachni/bin$ ./arachni

./arachni:12:in `require': no such file to load -- extensions/all (LoadError)
from ./arachni:12

Ok, this didn't help. I've read the StackOverflow thread a bit more and figured that I probably have an old version of Ruby:

alla@notsoshiny:~/arachni/bin$ ruby --version

ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

So, I installed a newer version of Ruby:

alla@notsoshiny:~/arachni/bin$ sudo apt-get install ruby1.9.1

And ran Arachni with ruby 1.9.1:
alla@notsoshiny:~/arachni/bin$ /usr/bin/ruby1.9.1 arachni
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- ap (LoadError)
from :29:in `require'
from /home/alla/arachni/lib/arachni/framework.rb:11:in `<top (required)>'
from /home/alla/arachni/lib/arachni.rb:11:in `require_relative'
from /home/alla/arachni/lib/arachni.rb:11:in `<top (required)>'
from :29:in `require'
from :29:in `require'
from /home/alla/arachni/lib/arachni/ui/cli/cli.rb:17:in `<module:Arachni>'
from /home/alla/arachni/lib/arachni/ui/cli/cli.rb:12:in `<top (required)>'
from :29:in `require'
from :29:in `require'
from arachni:16:in `<main>'

TO BE CONTINUED