Skip to content

rails 3 1 example gemfile

Daniel Kehoe edited this page Jun 8, 2011 · 24 revisions

Example Gemfile for Rails 3.1

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

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.5
  • Rails 3.1
  • Rake 0.9.2
  • Bundler 1.0.14

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

A JavaScript runtime is needed for Linux Ubuntu. It is not needed for Mac OS X (which uses the built-in Apple JavaScriptCore).

Add this to your Gemfile:

gem 'therubyracer', '>= 0.8.2'

Example Gemfiles

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

The apps have been tested with the indicated versions. If you are able to build an app with a newer gem, please create an issue on GitHub and I will update the app.

source 'http://rubygems.org'
gem 'rails', '>= 3.1.0.rc3'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem 'rspec-rails', '>= 2.6.1', :group => [:development, :test]
group :test do
  gem 'turn', :require => false
  gem 'factory_girl_rails', '>= 1.1.beta1'
  gem 'cucumber-rails', '>= 0.5.2'
  gem 'capybara', '>= 1.0.0.rc1'
  gem 'database_cleaner', '>= 0.6.7'
end
gem 'devise', '>= 1.3.4'
source 'http://rubygems.org'
gem 'rails', '>= 3.1.0.rc3'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem 'rspec-rails', '>= 2.6.1', :group => [:development, :test]
group :test do
  gem 'turn', :require => false
  gem 'factory_girl_rails', '>= 1.1.beta1'
  gem 'cucumber-rails', '>= 0.5.2'
  gem 'capybara', '>= 1.0.0.rc1'
  gem 'database_cleaner', '>= 0.6.7'
end
gem 'bson_ext', '>= 1.3.1'
gem 'mongoid', '>= 2.0.2'
gem 'mongoid-rspec', '>= 1.4.4', :group => :test
gem 'devise', '>= 1.3.4'
source 'http://rubygems.org'
gem 'rails', '>= 3.1.0.rc3'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem 'rspec-rails', '>= 2.6.1', :group => [:development, :test]
group :test do
  gem 'turn', :require => false
  gem 'factory_girl_rails', '>= 1.1.beta1'
  gem 'cucumber-rails', '>= 0.5.2'
  gem 'capybara', '>= 1.0.0.rc1'
  gem 'database_cleaner', '>= 0.6.7'
end
gem 'bson_ext', '>= 1.3.1'
gem 'mongoid', '>= 2.0.2'
gem 'mongoid-rspec', '>= 1.4.4', :group => :test
gem 'omniauth', '>= 0.2.6'
Clone this wiki locally