Rails 3 and RightAws 2.0.0

Feb 1, 2011

If you intend to use
right_aws for interacting
with S3 or other AWS services you will need,
for the time being, to use the git HEAD rather than the gem. At the time
of writing, the most recent gem release, 2.0.0, included some core
extensions which were incompatible with similar extensions added by
ActiveSupport.

I encountered the problem in a Rails 3 application which used
Devise for authentication.
After adding right_aws to the Gemfile, my tests suddenly started
failing with the following error:

After some poking around I discovered this
thread
which suggested right_aws was defining a version of
String#camelize which was incompatible with the version
defined by ActiveSupport (ActionController was obviously expecting
Devise::SessionsController). The Rightscale team were aware
of the issue
and have already committed a fix, but the new gem has not yet been
released.

Until it is, you can do one of two things:

Update your Gemfile to install right_aws directly from the git repository like
so (the dependency on right_http_connection is required, as the
as-yet-unrelease version of right_aws depends on the as-yet-unreleased version
of right_http_connection):

The latter suggestion comes from a
commentKoz added to the issue discussion. The
ActiveSupport::CoreExtensions module is defined before any
other gems are loaded (before the call to Bundler.require)
which I suppose ends up signaling to right_aws not to define the
conflicting version of String#camelize.

Both of these suggestions worked for me on an application using Rails
3.0.3 (and Devise 1.2.rc) on Ruby 1.9.2p136.