How to set up ( Fedora php ruby on rails )

Thursday, August 6, 2009

Installing ruby on rails on Fedora

how to setup ruby on rails on fedora(setting up ruby on rails on fedora 10 and 11)


1. Programming tools


First of all we need to check wether we have programming tools installed or not if installed than leave the next commnad



[ismail@localhost ~]$ which gcc make git
/usr/lib/ccache/gcc
/usr/bin/make
/usr/bin/git


if you have the same output as i do have than you may continue to next step leaving this one


[ismail@localhost ~]$ su -c 'yum install gcc make git'

2. Selecting Database


Rails supports number of databases and most common rails use are:

1. MySQL

2. SQLite

Installing MySQL for rails


[ismail@localhost ~]$ su -c 'yum install mysql-server mysql-libs mysql-devel'

Installing SQlite for rails


[ismail@localhost ~]$ su -c 'yum install sqlite sqlite-devel'

3. Installing Ruby language


Ruby on rails depends on ruby so before installing ruby on rails we must install Ruby language


[ismail@localhost ~]$ su -c 'yum install ruby ruby-devel ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs ruby-mysql ruby-sqlite3'

4. Installing RubyGem


RubyGem is Ruby language libraries


[ismail@localhost ~]$ wget -q http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz


[ismail@localhost ~]$ tar xzf rubygems-1.3.5.tgz

[ismail@localhost ~]$ cd rubygems-1.3.5

[ismail@localhost rubygems-1.3.5]$ su -c 'ruby setup.rb'

5. Installing Rails


[ismail@localhost ~]$ su -c 'gem install rails'

6. Installing server for rails


Rails comes with WEBrick server which is good for development not for production


[ismail@localhost ~]$ su -c 'gem install mongrel mongrel_cluster'

Apache server for rails application


Setting up Apache server for ruby on rails Application

7. SQlite binding for rails


[ismail@localhost ~]$ su -c 'gem install sqlite3-ruby'

8. MySQL binding for Rails


[ismail@localhost ~]$ cd /usr/lib
[ismail@localhost lib]$ for f in mysql/libmysql*.so mysql/libmysql*.so.1[56]; do ln -s $f; done

[ismail@localhost ~]$ su -c 'gem install mysql'

9. Your Are done with it


Now start building your rails appilcations

No comments:

Post a Comment