Wednesday, December 12, 2012

Install Ruby on Rails on Fedora 17







Ruby on Rails is a framework built on a programming language with object-oriented programming paradigm. Author Ruby programming language from Japan that Yukihiro Matsumoto, et al. Ruby was born in 1995.

Ruby on Rails merupakang development of the Ruby language support in the form of a framework for the application that is server side webiste. Developer Ruby on Rails is David Heinemeier Hansson.

Ok, now we go into the process of installing Ruby on Rails.
1. Open a terminal in Ubuntu (ctrl + alt + t)
2. Update using the commands in the terminal
sudo yum update

3. Install git using the command
sudo yum install git

4. Install curl using the command
sudo yum install curl

after the installation is complete curl do command as below
\ curl-kL https://get.rvm.io | bash-s stable
wait for it to finish.

5. Still in the terminal. Typing the command line like this:
source / etc / profile

if it did the next command as below:
rvm user gemsets

further typing the command like this:
rvm user all

in this stage, we adjust to the conditions that exist on your operating system:
- Source ~ / .rvm / scripts / RVM or
- Source ~ /. rvm /
if your operating system is no such directory scripts / rvm then use the command source ~ / .rvm / scripts /rvm check by pressing the tab on your computer keyboard. If no, you can use the command source ~ /. rvm /


then we checked the RVM package. Is RVM package is working or not. You do this by typing the following command in the terminal:
type rvm | head -n 1
press enter, a meal will issue a statement RVM is a function

after that, do check use in the RVM by typing the command:
rvm requirements


after checking. it will come out the list of packages that you must install. by the time I checked, the package should I install as below:
sudo apt-get install build-essential openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev
libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config


you can customize the package as it is.


after all that is done, now install Ruby.
6. check the package ruby available apda RVM repository
rvm list known

7. select according to need. and do the installation by typing a command like this:
rvm install 1.9.3

then use the existing ruby package by typing the command:
rvm use 1.9.3 - default

check for updates:
ruby-v



8. select according to need. and do the installation by typing a command like this:
RVM install 1.9.3

then use the existing ruby package by typing the command:
RVM use 1.9.3 - default

check for updates:
ruby -v

9. Ruby on Rails is basically using SQLite database. Well if you want to use the MySQL database you can install MySQL with commands like the following:
sudo yum install mysql-server mysql-libs mysql-devel
gem install mysql2


[root@fc11 ~]# cd /usr/lib
[root@fc11 lib]# ln -s mysql/libmysqlclient.so
[root@fc11 lib]# ln -s mysql/libmysqlclient.so.16
[root@fc11 lib]# ln -s mysql/libmysqlclient_r.so
[root@fc11 lib]# ln -s mysql/libmysqlclient_r.so.16



9. now kta install rails use by:
gem install rails
gem install libv8
gem install therubyracer

the installation process is complete ..
to start the project please follow the command as follows:
into your project directory and typing a command like the following in the terminal:
rails new testapp (if it will use SQLite database)
rails new testapp -d mysql (if you want to use a MySQL database)

open file name Gemfile
add this script below #Bundle edge Rails instead:
gem 'therubyracer '

cd dir/
and run script in terminal


kedala entry project directory that you created above.
and typing
rails s

Open a browser and typing the address
http://localhost:3000

good luck and hopefully useful.