Skip to content

rails 3 1 2 example gemfile

Daniel Kehoe edited this page Jan 29, 2012 · 3 revisions

Example Gemfile for Rails 3.1.2

Here are Gemfiles for the example apps in the Rails Apps repository.

For the newer Rails 3.2 release, see the Example Rails 3.2 Gemfile.

Background

For background, see Managing Rails Versions and Gems.

Also see instructions for Installing Rails 3.1.

The example apps have been tested with this configuration:

  • Ruby 1.9.2
  • RubyGems 1.8.11
  • Rails 3.1.2
  • Rake 0.9.2

Required Gems

The example applications use the following gems.

Two of the example apps use the Mongoid gem for access to a MongoDB datastore.

Two of the example apps use Devise for authentication.

One of the example apps uses OmniAuth for authentication.

I recommend checking for the newest versions of these gems before proceeding.

Ubuntu Linux

For Rails 3.1, a JavaScript runtime is needed for Linux Ubuntu. It is not needed for Mac OS X or Windows.

Add this to your Gemfile:

gem 'therubyracer', '>= 0.9.8'

Example Gemfiles

For the example apps built with Rails 3.1.2, I recommend that you use the following gems and specify versions optimistically (using the >= operator).

The example apps have been tested with the indicated versions.

source 'http://rubygems.org'
gem 'rails', '3.1.2'
gem 'sqlite3'
group :assets do
  gem 'sass-rails',   '~> 3.1.5.rc.2'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.0.rc1", :group => [:development, :test]
gem "factory_girl_rails", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.2.0", :group => :test
gem "capybara", ">= 1.1.2", :group => :test
gem "database_cleaner", ">= 0.7.0", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "devise", ">= 1.5.0"
source 'http://rubygems.org'
gem 'rails', '3.1.2'
group :assets do
  gem 'sass-rails',   '~> 3.1.5.rc.2'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.0.rc1", :group => [:development, :test]
gem "database_cleaner", ">= 0.7.0", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.2.0", :group => :test
gem "capybara", ">= 1.1.2", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.3.3"
gem "devise", ">= 1.5.0"
source 'http://rubygems.org'
gem 'rails', '3.1.2'
group :assets do
  gem 'sass-rails',   '~> 3.1.5.rc.2'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.0.rc1", :group => [:development, :test]
gem "database_cleaner", ">= 0.7.0", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.2.0", :group => :test
gem "capybara", ">= 1.1.2", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.3.3"
gem "omniauth", ">= 1.0.0"