I am using marcel’s aws-s3 gem. I’m trying to require it in my project:
gem 'aws-s3', :require => 'aws/s3'
However, it doesn’t get required:
irb(main):003:0> require 'aws/s3'
=> false
How can I get rid of the AWS::S3:: namespace?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using Bundler, the
:requirepart in the Gemfile already should require the gem. Requiring it again manually will then return false. Try it with something from the stdlib, e.g. start IRB and require ‘set’ twice in a row.Regarding the
AWS::S3::part. Assume for a moment that Bundler orrequirewould get rid of all the namespacing and you’d use the AWS gem in a Rails app, how’d you distinguish betweenAWS::S3::BaseandActiveRecord::Base? If you really still want to get rid of the namespace,include AWSandinclude S3.