Example Gemfile for Rails 3.1.0

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.10
  • Rails 3.1.0
  • 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.2'

Example Gemfiles

For the example apps built with Rails 3.1.0, 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.

rails3-devise-rspec-cucumber

source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'sqlite3'
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "devise", ">= 1.4.4"

rails3-mongoid-devise

source 'http://rubygems.org'
gem 'rails', '3.1.0'
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.2.0"
gem "devise", ">= 1.4.4"

rails3-mongoid-omniauth

source 'http://rubygems.org'
gem 'rails', '3.1.0'
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.2.0"
gem "omniauth", ">= 0.2.6", :git => "git://github.com/intridea/omniauth.git"

Comments

Is this helpful? Your encouragement fuels the project. Please tweet or add a comment. Couldn't get something to work? For the example apps and tutorials, it's best to open an issue on GitHub so we can help you.

comments powered by Disqus