I'm developing a Rails 3 Engine for one of our projects. To debug an issue I moved the gem declaration to a :path
statement, as the edge guide suggests. It comes about two gems after the requirement for the aws-s3
gem. Now, when I try to start up the development server using rails s
, I get an error from aws-s3
that looks like this:
/Users/me/.rvm/gems/ruby-1.9.3-p194@xproject/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:212:in `const_missing_from_s3_library': uninitialized constant MyEngineNamespace::Engine (NameError)
The associated bit of code in the S3 gem looks like this:
def const_missing_from_s3_library(sym)
if sym.to_s =~ /^(\w+)(Bucket|S3Object)$/
const = const_set(sym, Class.new(AWS::S3.const_get($2)))
const.current_bucket = $1.underscore
const
else
const_missing_not_from_s3_library(sym)
end
end
alias_method :const_missing_not_from_s3_library, :const_missing
alias_method :const_missing, :const_missing_from_s3_library
But I'm not at all sure why this code got called; the engine doesn't (intentionally) touch S3. So... huh?