Ruby on Rails
Ruby on Rails is an open source web framework for developing database backed web applications. It is optimized for sustainable productivity of the programmer since it lets the programmer to write code by favouring convention over configuration.
Installation
- Make sure Apache 2 and MySQL already installed
- Install build-essential, paste code below in your console
sudo apt-get install build-essential
- Install Ruby and others components
sudo apt-get install ruby ri rdoc irb ruby-dev libruby libmysql-ruby libopenssl-ruby libmysqlclient-dev sqlite3 libsqlite3-ruby libsqlite3-dev
- Install RubyGems
sudo apt-get install rubygems
- Install Rails
sudo gem install rails
- Install Mongrel-Cluster
sudo gem install mongrel_cluster
- Install mysql and sqlite3 gem
sudo gem install mysql sqlite3-ruby
- For optional I add this command to create symbolik link
sudo ln -s /var/lib/gems/1.8/bin/rails /usr/bin/rails sudo ln -s /var/lib/gems/1.8/bin/rake /usr/bin/rake
Now test your installation, create rails applications with this command
rails testapp cd testapp/ script/server
Then open http://localhost:3000, if successful will be the default screen out Ruby on Rails.
Note :
- Command above will create rails application using SQlite3 database
- if you will create rails application using mysql database, change your command with
rails -d mysql <nameapplication>