Thursday, August 30, 2012

Creating a new Ruby on Rails Project

Though creation of a new project has been mentioned in our previous post on "Introduction to Ruby on Rails", I am taking out the exact part of creating a new project into a blogpost as it would be easy for you to bookmark it.

Creation of new Rails project - Project name: first_app

#creates a rails app with all required folders
rails new first_app

#enter the directory of our app
cd first_app

Edit the Gemfile  specifying the exact versions of the gems required

source ''

gem 'rails', '3.2.8'

group :development do
  gem 'sqlite3', '1.3.5'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'

  gem 'uglifier', '1.2.3'

gem 'jquery-rails', '2.0.2'

#Install the gems specified
bundle install 

#start the server
rails server

Open the webpage http://localhost:3000


Post a Comment