Added by on 2013-10-07

1. In this section, we’ll outline our plans for the demo application. We’ll start by generating the application skeleton using the rails command:

cd rails_project
rails new demo_app
cd demo_app

2. Next, we’ll use a text editor to update the Gemfile needed by Bundler with

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.0'

group :development do
  gem 'sqlite3', '1.3.8'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

3. We’ll install the local gems while suppressing the installation of production gems using the –without production option:

bundle install --without production
bundle update
bundle install

(Recall that if Bundler complains about a readline error, try adding gem ’rb-readline’ to your Gemfile.)

4. Finally, we’ll put the demo app under version control. Recall that the rails command generates a default .gitignore file, but depending on your system you may find the augmented file from Listing 1.7 to be more convenient. Then initialize a Git repository and make the first commit:

git init
git add .
git commit -m "Initial commit"

Category:

Ruby

Tags:

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*