Wednesday 25 May, 2011

How to Install Fedena on Fedora 15

How to Install Fedena on Fedora 15

Reason to write this howto is I couldn't found good howto installtion guide anywhere. Even on projectfedena site you will get only ubuntu specific howto and that is also not complete.
1. Setup required ruby, rubygems, rails and other packages.

# yum install ruby rubygems ruby-mysql.x86_64 mysql-server

remove the fedora 15 repository rubygems rpm and install f14 rubygems rpm. as newer version is not compitable.

# yum localinstall rubygems-1.3.7-2.fc14.noarch

2. Download latest fedena source code from GitHub.

# wget -c https://download.github.com/projectfedena-projectfedena_v2.0-a213125.tar.gz

extract it to the installation directory.
I normally uses /opt non-fedora repository packages.

#tar -zxvf /home/user/Downloads/Packages/projectfedena-projectfedena_v2.0-a213125.tar.gz
#mv projectfedena-projectfedena_v2.0-a213125 /opt/fedena
 
3.Installing Rails version 2.3.5
Fedena runs on version 2.3.5 of rails,
This will fetch and install ruby packages by gem command.

[root@pradhumna fedena]# gem install rails -v=2.3.5
Fetching: activesupport-2.3.5.gem (100%)
:
:   (content trimmed and removed)
:

Installing RDoc documentation for rails-2.3.5...

4. Setup mysql server and database details in database.yml.

Because fedena uses mysql database.

# yum install mysql-server mysql-client libmysql-ruby

start mysqld service.

# service mysqld restart
[root@pradhumna fedena]# service mysqld restart
Restarting mysqld (via systemctl):                         [  OK  ]
# mysql -p
mysql> create databse fedena;
mysql> grant all on fedena.* to fedena@localhost identified by 'fedenapass';
mysql> flush privileges;
mysql> quit;

Now put database details in database.yml file.

# cd /opt/fedena/

Open the file database.yml in the config folder of the fedena soucre. And change the following details.

# vim /opt/fedena/config/database.yml

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 .Installing the prawn gem
#gem install prawn -v=0.6.3

6.Installing the rest of the gems
Install the rest of the gems by running
#rake gems:install        (According to install guide on projectfedena.org)

This command doesn't work in fedora. I got following error. 
If you install rubygems version newer than  3.7-2. YOu will get the following error.
So remove it and install 3.7.2 rpm.

 [root@pradhumna fedena]# rake gems:install
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex

(See full trace by running task with --trace)

So I tried following command. You need to be in fedena intallation home directory.

[root@pradhumna fedena]# gem install rake
Fetching: rake-0.9.0.gem (100%)
Successfully installed rake-0.9.0
1 gem installed
Installing ri documentation for rake-0.9.0...
Installing RDoc documentation for rake-0.9.0...

# rake gems:install

No comments: