Fedora 7 guide to installing Ruby on Rails with Mongrel in a development enviroment
May 31st, 2007
Fedora 7
This is a very basic guide to getting Ruby on Rails running with Mongrel in a development enviroment. If you don’t have much experience with Linux or Fedora this guide should be step-by-step with a default installation.
Become root first::
$ su -
# yum install ruby ruby-rdoc ruby-irb ruby-ri ruby-doc
wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
# tar xvfz rubygems-0.9.4.tgz
# cd rubygems-0.9.4
# ruby setup.rb
# cd ..
# rm -rf rubygems*
Be careful with this, as it will delete everything that starts with rubygems in this directory recursively.
# gem install rails --include-dependencies
# yum install ruby-devel mysql mysql-devel mysql-server
# service mysqld restart
# mysqladmin -u root password '(passwd')
# gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
I chose Mysql 2.7; you’ll need to do some coaxing to install Mysql 2.6 correctly.
Drop out of root:
# exit
$ nano /(path to RoR project)/config/database.yml
Your database.yml should look like this. Replace the database name with your db, your username, password, etc:
development:
adapter: mysql
database:
username:
password:
host: localhost
socket: /var/lib/mysql/mysql.sock
test:
adapter: mysql
database:
username:
password:
host: localhost
socket: /var/lib/mysql/mysql.sock
production:
adapter: mysql
database:
username:
password:
host: localhost
socket: /var/lib/mysql/mysql.sock
Get back into root:
su -
#gem install daemons gem_plugin mongrel mongrel_cluster
You’ll get this long string of text:
Successfully installed daemons-1.0.6
Installing ri documentation for daemons-1.0.6...
Installing RDoc documentation for daemons-1.0.6...
Successfully installed gem_plugin-0.2.2
Installing ri documentation for gem_plugin-0.2.2...
While generating documentation for gem_plugin-0.2.2
... MESSAGE: Unhandled special: Special: type=33, text="Implements"
... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/gem_plugin-0.2.2/ri --quiet lib README
(continuing with the rest of the installation)
Installing RDoc documentation for gem_plugin-0.2.2...
Select which gem to install for your platform (i386-linux)
1. mongrel 1.0.1 (mswin32)
2. mongrel 1.0.1 (ruby)
3. mongrel 1.0 (mswin32)
4. mongrel 1.0 (ruby)
5. Skip this gem
6. Cancel installation
> 2
Install required dependency fastthread? [Yn] Y
Select which gem to install for your platform (i386-linux)
1. fastthread 1.0 (ruby)
2. fastthread 1.0 (mswin32)
3. fastthread 0.6.4.1 (mswin32)
4. fastthread 0.6.4.1 (ruby)
5. Skip this gem
6. Cancel installation
>1
Drop back out of root:
# exit
I chose the latest versions. Watch out for incompatible versions.
You should be done. Edit your project and then start mongrel:
mongrel_rails start /(path to project)/
I’m just using this for a development system, I’ll add more once I start playing around with deployment.