<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;Integral is written in &lt;a href=&quot;http://ruby-lang.org&quot;&gt;Ruby&lt;/a&gt;, and depends on a couple of &lt;a href=&quot;http://www.rubygems.org&quot;&gt;Ruby gems&lt;/a&gt;, so you&amp;#8217;ll need to install Ruby and rubygems before you go any further. Once they&amp;#8217;re setup this command should install all the gems that you need:&lt;/p&gt;
$ sudo gem install rake thor activerecord rspec
&lt;p&gt;Integral stores it&amp;#8217;s data in a relational database. You can use any database that is supported by ActiveRecord. In this example we&amp;#8217;ll use &lt;a href=&quot;http://www.sqlite.org&quot;&gt;SQLite&lt;/a&gt;, which is very easy to get started with as the Integral config files are pre-configured for it. You&amp;#8217;ll need to install your database, then ensure that Ruby support for your database is installed. In the case of SQLite that means you need the sqlite3-ruby gem:&lt;/p&gt;
$ sudo gem install sqlite3-ruby
&lt;p&gt;Grab yourself a copy of the Integral source code. You can download a tarball from Github, or clone the repository directly with git:&lt;/p&gt;
$ git clone git://github.com/gma/integral.git
$ cd integral
&lt;p&gt;Once you&amp;#8217;ve got the code you need to tell Integral how to connect to your database (the database.yml file is in the same format as used by &lt;a href=&quot;http://www.rubyonrails.org&quot;&gt;Ruby on Rails&lt;/a&gt;, so you can follow &lt;a href=&quot;http://wiki.rubyonrails.org/rails/pages/database.yml&quot;&gt;instructions elsewhere&lt;/a&gt; on how to configure it):&lt;/p&gt;
$ cp config/database.yml.sample config/database.yml
&lt;p&gt;You also need to make a copy of the default Integral configuration file.&lt;/p&gt;
$ cp config/config.yml.sample config/config.yml
&lt;p&gt;If you want to use a different database just edit the database.yml file accordingly. MySQL and Postgres users will now need to create their databases (called integral_test and integral_production &#8211; note that there is no separate development database as there is with &lt;a href=&quot;http://www.rubyonrails.org&quot;&gt;Ruby on Rails&lt;/a&gt;). SQLite users can skip the creation step (it happens automatically) and move straight on to setting up the database schema. We need to do it twice so we can run the tests in the test database whilst storing our real data in the production database:&lt;/p&gt;
$ INTEGRAL_ENV=test thor db:migrate
$ thor db:migrate
&lt;p&gt;&lt;a href=&quot;http://yehudakatz.com/2008/05/12/by-thors-hammer/&quot;&gt;Thor&lt;/a&gt; is a very neat library that makes it extremely easy to write binary commands in Ruby &#8211; it is used for all the command line scripting in Integral.&lt;/p&gt;
&lt;p&gt;Finally, to check that everything is working, try running Integral&amp;#8217;s tests (there should be no failures):&lt;/p&gt;
$ rake spec
&lt;p&gt;Now list the available thor tasks to check that thor is working okay:&lt;/p&gt;
&lt;pre&gt;
$ thor -T

db
--
db:migrate                               migrate the database
db:init                                  create first successful test run

app
---
app:list                                 show all applications
app:add NAME PATH                        add an application to be tested
app:remove NAME                          remove an application (caution!)
app:activate NAME                        activate an existing application
app:deactivate NAME                      deactivate an active application 

tests
-----
tests:run                                run the integration tests
tests:recent                             show results of last 5 runs

versions
--------
versions:staging [--verbose]             show apps on test server
versions:live [--verbose]                show apps on live server
versions:check APP VERSION [--verbose]   check whether combination is tested

&lt;/pre&gt;
&lt;p&gt;You&amp;#8217;re done. Time to configure your applications &#8211; head over to [[Configuring Integral]].&lt;/p&gt;</body>
  <created-at type="datetime">2008-11-11T13:50:32-08:00</created-at>
  <id type="integer">79486</id>
  <permalink>installing-integral</permalink>
  <repository-id type="integer">72328</repository-id>
  <title>Installing Integral</title>
  <updated-at type="datetime">2009-03-03T07:14:29-08:00</updated-at>
  <user-id type="integer">2122</user-id>
</wiki>
