Installation instructions

Fedena requires Ruby,Rails,MySQL and some gems installed.

Windows Installation :

Installation using Bundle Patch:

Step 1: Install Ruby
Download and install One-Click Ruby Installer for Windows.
http://rubyforge.org/frs/download.php/72085/rubyinstaller-1.8.7-p302.exe

Step 2: Install Bundler gem
Now we can use the RubyGems package manager to download and install Bundler Open a command window and run the command "gem install bundler --remote" .

Step 3: Install MySQL
1. Download and install the "essential" version of the MySQL installer v5.0
http://downloads.mysql.com/archives/mysql-5.0/mysql-essential-5.0.90-win32.msi
(skip this step if you already have MySQL installed)
2. Copy libmysql.dll from MySQL bin directory (usually C:\Program Files\MySQL\MySQL Server 5.0\bin) to Ruby bin directory (usually C:\Ruby\bin)

Step 4: Setup Fedena
1. Download Fedena bundle patched source code from here. Extract the ZIP/TAR archive and save to a folder (say C:\Fedena).
2. Now goto the fedena source directory in the command window.
3. Run the command "bundle install --local".
4. Update the MySQL database details in config/database.yml (under "development:")
5. Run the command "rake db:create". This will create the required database.
If your MySQL user does not have database creation privilages, just create the database from your Database manager and you may skip this step.
6. Run the command "rake fedena:plugins:install_all". This will populate the database with required tables.
7. Finally, run the command "mongrel_rails start".This would start the server and it will be accessible at http://localhost:3000
8. If you want to run Fedena in production mode, run the command "mongrel_rails start -e production". For this, Production database details should be given in config/database.yml
9. Open a new windows command line window and navigate to fedena root directory
10. Run the command "rake jobs:work"

Manual Installation (For Development)

Step 1: Install Ruby
Download and install One-Click Ruby Installer for Windows.
http://rubyforge.org/frs/download.php/72085/rubyinstaller-1.8.7-p302.exe

Step 2: Install Rails
Now we can use the RubyGems package manager to download and install Rails 2.3.5(Note: Version should be 2.3.5),
Open a command window and run the command "gem install rails -v=2.3.5 --remote" (without quotes).

Step 3: Install MySQL
1. Download and install the "essential" version of the MySQL installer v5.0
http://downloads.mysql.com/archives/mysql-5.0/mysql-essential-5.0.90-win32.msi
2. Copy libmysql.dll from MySQL bin directory (usually C:\Program Files\MySQL\MySQL Server 5.0\bin) to Ruby bin directory (usually C:\Ruby\bin)

Step 4: Setup Fedena
1. Download Fedena source code from GitHub. Extract the ZIP/TAR archive and save to a folder (say C:\Fedena).
2. Now goto the fedena source directory in command line/prompt.
3. Run the following commands:
  a. "gem install mysql"
  b. "gem install declarative_authorization -v 0.5.1"
  c. "gem install i18n -v 0.4.2"
4. Update the MySQL database details in config/database.yml (under "development:")
5. Run the command "rake db:create". This will create the required databases.
6. Apply delayed job patch for Windows
  a. Download delayed job plugin from https://github.com/projectfedena/delayed_job
  b. Replace the content of folder vendor/plugins/delayed_job with downloaded files.
7. Run the command "rake fedena:plugins:install_all". This will populate the database with required tables.
8. Finally, run the command "ruby script/server".This would start the server and it will be accessible at http://localhost:3000
9. If you want to run Fedena in production mode, run the command "ruby script/server -e production". For this, Production database details should be given in config/database.yml
10. Open a new windows command line window and navigate to fedena root directory
11. Run the command "rake jobs:work"

Installation on Ubuntu 11.04 :

Installation using Bundle Patch:

Step 1: Install Ruby and RubyGems
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
cd /usr/local/src
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1

Step 2: Install Bundler gem
Now we can use the RubyGems package manager to download and install Bundler Open a command window and run the command "sudo gem install bundler" .

Step 3: Install MySQL
sudo apt-get install libmysqlclient-dev mysql-server
sudo gem install mysql

Step 4: Setup Fedena
1. Download Fedena bundle patched source code from here. Extract the ZIP/TAR archive and save to a directory.
2. Run the command "bundle install --local".
3. Update the MySQL database details in config/database.yml (under "development:")
4. Open Terminal and navigate to Fedena source. Run the command "rake db:create". This will create the required database.
If your MySQL user does not have database creation privilages, just create the database from your Database manager and you may skip this step.
5. Run the command "rake fedena:plugins:install_all". This will populate the database with required tables.
6. Finally, run the command "script/server".This would start the server and it will be accessible at http://localhost:3000

Manual Installation Steps:

1.Setting up the Rails development environment
Ruby, rubygems, rails and other required packages can be installed by :
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
cd /usr/local/src
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1
sudo gem install rails -v 2.3.5

2.Setting up MySQL server
Fedena uses mysql, so run,
"sudo apt-get install libmysqlclient-dev mysql-server"
Do remember the mysql password you set during this step, it is required in step five.

3.Download the latest Fedena source code from github
Download Fedena source code from GitHub. Extract the downloaded .zip archive to a convenient location where you would be running fedena . Let us say we extracted it to a directory named fedena in my home(~) directory.

4.Setup your database details in the database.yml
Open the file database.yml in the config folder of the fedena soucre. Change the following details:
database: fedena - The name of the database you want to use for fedena
username: root - Mysql username for fedena
password: mypass - The password for the above mysql user

5.Install the rest of the gems
"gem install declarative_authorization -v 0.5.1"
"gem install i18n -v 0.4.2"

6.Set up Fedena databases
From the Fedena source directory in terminal run, "rake db:create" followed by, "rake fedena:plugins:install_all"

7.Change permissions for scripts
From the same directory grant executable permissions for the files in script directory by,
"chmod +x script/*"

8.Run the inbuilt server
If everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,
"script/server"

Fedena PDF Settings :

PDF Reports in Fedena are generated using wkhtmltopdf. By default, we have set it to i386. If you are using AMD64, open file config/initializers/wicked_pdf.rb and change "i386" to "amd64"

You can download the wkhtmltopdf binaries from Google Code. After the file is downloaded, update the "exe_path" in config/initializers/wicked_pdf.rb with the Path to binary.