Ruby on Rails (Installation and Starting Up Server)
From Oxxus Wiki
Contents |
Overview
Rails represents a web application framework completely developed in Ruby programming language. It provides ability to do more with less coding involved. Requires Ruby on system where it's going to be installed.
Download
Ruby can be installed using all package installers like yum or apt-get/aptitude.
Once Ruby is installed, GEM installer is required.
Gem installer is package maintainer and installer just like yum or apt-get but developed only for Ruby purpose.
Installation of RubyGems requires Ruby programming language. RubyGems can be downloaded from the official pages as archive.
When downloaded and unpacked, Gems can be installed with command ruby setup.rb from archive unpacked folder.
Rails requires SQLite which is default database engine which Rails support. If MySql or PostGreSQL is used, than these service also have to be instaled and Ruby's configuration file adjusted.
Installation
With Gem installer active, Rails is easy to install, with command: gem install rails, issued from shell prompt of Linux OS based server or hosting account.
The installation can take a while, however once Rails is installed, it is ready for creating application skeleton and starting server to serve web pages.
New application skeleton is created with command:
rails new <path/to/your/new/application>
With new skeleton created server can be started from:
<path/to/your/new/application>
with command Rails server.
Notes
Ruby's server on Rails works on default port 3000 and to access web application port has to be stated after IP or domain name url.