Skip to content

Installing Rails FtP on Fedora 20 64 bit

benwbrum edited this page Nov 23, 2014 · 6 revisions

Special instructions for installing Rails on a blank Fedora 20

Notes on MariaDB 10.01

The instructions below need to be modified slightly for MariaDB 10.01.

  • When creating the database, rather than CHARACTER_SET="utf8" COLLATE="utf8_general_ci", use CHARACTER SET utf8 COLLATE utf8_general_ci
  • When creating the rails user, specify the host explicitly in the password: set password for rails@localhost = PASSWORD('rails'); (You may also need to set the password for rails as well.)**

Installing with MariaDB 5.5

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

# can probably use bundler to do this without extra work.
#gem install hpricot oai will_paginate rmagick
#gem install -v 2.3.5 rails
# 1 hour

gem install bundler

# we need a database
yum install mysql
#yum install ruby-mysql
#ruby-mysql doesn't exist anymore
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
# start MariaDB
service mysqld start

# create the database
mysql
MariaDB [(none)]> create user rails;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> set password for rails = PASSWORD('rails');
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> create database fromthepage_development character_set='utf8' collate='utf8_general_ci';

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant  all privileges on fromthepage_development.* to 'rails'@'localhost';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> create database fromthepage_production character set='utf8' collate='utf8_general_ci';
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant  all privileges on fromthepage_production.* to 'rails'@'localhost';
Query OK, 0 rows affected (0.00 sec)

# not sure this is still required
yum install ncurses-devel ncurses-static 
yum install readline-devel readline-static 
yum install ncurses ncurses-libs ncruses-devel ncurses-term ruby-ncurses

#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
# WE ARE HERE (not sure the last worked)


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