Trip
Trip

Reputation: 27124

I am getting "no such file to load -- aws/s3" even though I have it

$ sudo gem install aws-s3

$ irb -rubygems
$ require 'aws/s3'

=> true

So I have the gem everything works.. but now I console into my application..

$ script/console
$ require 'aws/s3'

MissingSourceFile: no such file to load -- aws/s3
    from /Library/Ruby/Gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Library/Ruby/Gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from /Library/Ruby/Gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    from (irb):1

What could that be from?

Upvotes: 1

Views: 4357

Answers (1)

jonnii
jonnii

Reputation: 28332

It's hard to say exactly what your problem is, but depending on your rails version you should make sure you have the gem specified in your Gemfile (rails-3) or in your environment.rb (rails 2).

Once you fix this problem I suggest you take the time to learn more about managing gems, it's not a difficult topic and will pay dividends. I suggest looking into rvm and break the habit of using sudo to install gems.

If you are on Rails 2 you should also consider either upgrading to rails 3 or using bundler (this is an old link, but I think the instructions should still work).

Upvotes: 6

Related Questions