Skip to content

Development environment

Zapotek edited this page Mar 27, 2013 · 15 revisions

Setting up a development environment

In order to ensure that what you'll be experiencing during development will be what the end-user will experience in terms of stability, performance and compatibility, the preferred way to setup a development environment is to essentially work from inside one of Arachni's self-contained packages.

Actually, this makes setting up a development environment even easier as you won't have to go digging through dependencies or affecting the libraries and packages of your workstation at all.

All this goodness is facilitated by the project's build scripts.

The following will build and setup a self-contained environment for you:

ARACHNI_BUILD_ENV=development wget -O - https://raw.github.com/Arachni/build-scripts/master/bootstrap.sh | bash

The ARACHNI_BUILD_ENV=development env tells the build-scripts to preserve development headers of all the libraries it installs so that you'll be able to install more gems inside that env if need be. (If you don't plan on installing extra gems you can leave the ARACHNI_BUILD_ENV variable undefined and save some space.)

Finally, if you are using RVM, put this in your .rvmrc file:

# Clear RVM's env overrides to make room for ours
rvm reset

# Get us into the package env
export env_root=/home/<username>/arachni-build-dir/arachni/system
source $env_root/environment
export PATH=$env_root/gems/bin:$PATH

If not using RVM you'll have to run the above manually when working from the terminal while developing Arachni. (I suggest putting the above in a shellscript named arachni-setenv.sh and running it from the same terminal you plan to use to test/run/dev with Arachni.)