Flowdock
method

gem

Importance_4
Ruby on Rails latest stable (v4.0.2) - 3 notes - Class: Rails::Configuration

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

These similar methods exist in v4.0.2:

gem(name, options = {}) public

Adds a single Gem dependency to the rails application. By default, it will require the library with the same name as the gem. Use :lib to specify a different name.

  # gem 'aws-s3', '>= 0.4.0'
  # require 'aws/s3'
  config.gem 'aws-s3', :lib => 'aws/s3', :version => '>= 0.4.0',      #     :source => "http://code.whytheluckystiff.net"

To require a library be installed, but not attempt to load it, pass :lib => false

  config.gem 'qrp', :version => '0.4.1', :lib => false
Show source
Register or log in to add new notes.
August 25, 2008 - (>= v2.1.0)
6 thanks

Rake tasks for gem dependencies

You can manage installation and other tasks for these dependencies with rake tasks, for example:

rake gems:install              # Installs all required gems for this application
rake gems:unpack               # Unpacks the specified gem into vendor/gems

To get all rake tasks about gems:

rake -T gems
December 18, 2009
4 thanks

Version Ranges

To specify a version range, use array syntax like this:

config.gem 'paperclip', :version => ['>= 2.3.1.1', '< 3.0']

The example will, of course, match any version 2.3.1.1 or newer up until (not including) 3.0 or later.

December 1, 2008 - (>= v2.2.1)
1 thank

Upgrading from Rails v2.1 to v2.2

Don’t forget to run

rake gems:refresh_specs

if you vendored any gem plugins under Rails v2.1 to update them with the proper specs.