Skip to content

Installing Rails on Fedora 13

benwbrum edited this page Dec 28, 2011 · 10 revisions

Special instructions for installing Rails on a blank Fedora 13

Blank Fedora installations require a great deal of extra work in order to get a basic Rails stack working:

yum install zlib zlib-devel zlib-static
yum groupinstall "Web Server"
yum install gcc
yum install make

# Install ruby from scratch, since Fedora doesn't believe in ruby 1.8.7
wget ftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7-p302.tar.gz
mv ruby-1.8.7-p302.tar.gz /usr/local/src/
cd /usr/local/src/
tar -zxvf ruby-1.8.7-p302.tar.gz 
cd ruby-1.8.7-p302
./configure
make
make install

# Install gem from scratch, since Fedora only packages the non-working 1.2.0
cd
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar xzf rubygems-1.3.7.tgz 
cd rubygems-1.3.7
ruby setup.rb 

yum install ImageMagick
yum install ImageMagick-devel 

gem install hpricot oai will_paginate rmagick
gem install -v 2.3.5 rails
# 1 hour

# we need a database
yum install mysql
yum install ruby-mysql
yum install git

gem install passenger
yum install gcc-c++ 
yum install curl-devel
yum install openssl-devel
yum install httpd-devel
yum install apr-devel
cd /usr/local/src/ruby-1.8.7-p302
cd ext
cd openssl/
ruby extconf.rb
make
make install
cd

passenger-install-apache2-module
#
# Follow the instructions displayed for editing your /etc/conf/httpd.conf file

yum install mysql-devel
yum install mysql-server 

gem install mysql

# create the database
mysql
mysql> create user rails;
mysql> mysql> set password for rails = PASSWORD('XXXXXX');
mysql> create database fromthepage_development;
Query OK, 1 row affected (0.00 sec)

mysql> grant  all privileges on fromthepage_development.* to 'rails'@'localhost';

yum install ncurses-devel ncurses-static 
yum install readline-devel readline-static 
yum install ncurses ncurses-libs ncruses-devel ncurses-term ruby-ncurses

cd /usr/local/src/ruby-1.8.7-p302/ext/readline/
ruby extconf.rb 
make
make install


#create the fromthepage user
adduser fromthepage
# cd into the location you want FromThePage installed, probably /home/fromthepage
cd /home/fromthepage
#get the code
git clone "git://github.com/benwbrum/fromthepage.git"
# edit the database.yml to change the development db to fromthepage_development and update the password appropriately
#  also had to comment out the "socket" line and add a "hostname" value

cd fromthepage/config
vi database.yml

#  socket: /var/run/mysqld/mysqld.sock
  host: localhost

#load the schema definition into the database account. 
rake --trace db:migrate

# modify your httpd.conf to point at the fromthepage/public directory as its DocumentRoot
DocumentRoot "/home/fromthepage/fromthepage/public"

# Modify Directory stanza in httpd.conf location to match the DocumentRoot
<Directory "/home/fromthepage/fromthepage/public">


apachectl restart

yum install graphviz