Skip to content

Instantly share code, notes, and snippets.

@jasdeepsingh
Created October 10, 2011 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdeepsingh/1274666 to your computer and use it in GitHub Desktop.
Save jasdeepsingh/1274666 to your computer and use it in GitHub Desktop.
/config/initializers/s3.rb:1:in `<top (required)>': uninitialized constant AWS (NameError) - AWS-S3 Gem not working Mac OS X Lion
# If you are facing such an Error while installing/working with the aws-s3 gem
# /config/initializers/s3.rb:1:in `<top (required)>': uninitialized constant AWS (NameError)
# try adding this to your Gemfile instead..
gem 'aws-s3', :require => 'aws/s3'
# I was having this issue on Mac OS X Lion with aws-s3 gem 0.6.2
@mcelaney
Copy link

Thanks so much for adding this...

@jasdeepsingh
Copy link
Author

No problem Sir! Pleasure is mine!

@toptierlabs
Copy link

Why is this?

@jasdeepsingh
Copy link
Author

@toptierlabs: You mean why we get this error???

@toptierlabs
Copy link

Sorry, I mean why :require => 'aws/s3' fixes it?

@jasdeepsingh
Copy link
Author

@toptierlabs: This is because the library names specified for this gem are different than the actual gem name... the line

:require => 'aws/s3'

just lets bundler know what files to include for this gem. Let me know if that clears your doubt? Thanks!

@toptierlabs
Copy link

It's clear! Thank you.

@jasdeepsingh
Copy link
Author

jasdeepsingh commented Jan 25, 2012 via email

@leandrojo
Copy link

Thanks!

@simonfranzen
Copy link

If some got to this thread in 2018 -> See this thread with the same problem. https://stackoverflow.com/a/49222325/1625253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment