Skip to content

rails 3 2 example gemfile

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

Example Gemfile for Rails 3.2

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

Background

See Installing Rails 3.2 for detailed instructions and advice.

The example apps have been tested with this configuration:

  • Ruby 1.9.3
  • RubyGems 1.8.15
  • Rails 3.2.1
  • Rake 0.9.2.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

Since Rails 3.1, a JavaScript runtime has been needed for development on Linux Ubuntu. It is not needed for Mac OS X or Windows.

For development on Linux Ubuntu, it’s best to install the Node.js server-side JavaScript environment:

sudo apt-get install nodejs

and set it in your $PATH.

If you don’t install Node.js, you’ll need to add this to the Gemfile for each Rails application you build:

gem 'therubyracer', '>= 0.9.9'

Example Gemfiles

For the example apps built with Rails 3.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 'https://rubygems.org'
gem 'rails', '3.2.0'
gem 'sqlite3'
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'  
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.1", :group => [:development, :test]
gem "factory_girl_rails", ">= 1.6.0", :group => :test
gem "cucumber-rails", ">= 1.2.1", :group => :test
gem "capybara", ">= 1.1.2", :group => :test
gem "database_cleaner", ">= 0.7.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "devise", ">= 2.0.0"
source 'https://rubygems.org'
gem 'rails', '3.2.0'
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.7.1", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.6.0", :group => :test
gem "cucumber-rails", ">= 1.2.1", :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.4.3"
gem "devise", ">= 2.0.0"
source 'https://rubygems.org'
gem 'rails', '3.2.0'
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.7.1", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.6.0", :group => :test
gem "cucumber-rails", ">= 1.2.1", :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.4.3"
gem "omniauth", ">= 1.0.2"
gem "omniauth-twitter"
source 'https://rubygems.org'
gem 'rails', '3.2.0'
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "haml", ">= 3.1.4"
gem "haml-rails", ">= 0.3.4", :group => :development
gem "rspec-rails", ">= 2.8.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.7.1", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.6.0", :group => :test
gem "cucumber-rails", ">= 1.2.1", :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.4.3"
gem "devise", ">= 2.0.0"
Clone this wiki locally