[rubygem]RubyGemsのアップデート

gem update --system

[rails]railsのバージョンを指定してRailsケルトンを作成

rails _2.1.2_ appname

appname/config/environment.rb

# Be sure to restart your server when you modify this file

# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION

以下略

RAILS_GEM_VERSIONが指定したバージョンになっている


※指定しなければ最新バージョンで作成される

rails appname