阅读背景:

Upgraded to rails 3.2 and AWS object is nolonger working, how come?

来源:互联网 

This hasn't got anything to do with paperclip, btw.

这与paperclip没什么关系,顺便说一句。

I've upgraded to rails 3.2 from a early version of rails 3.

我从早期版本的rails 3升级到rails 3.2。

I was using the AWS:S3 class to create buckets and what not.

我正在使用AWS:S3类来创建存储桶,而不是。

The following code was working inside a model:

以下代码在模型中工作:

AWS::S3::Base.establish_connection!(:access_key_id => ...blah blah blah

I was also requiring the gem in the model like so:

我还要求模型中的gem如下:

require 'aws/s3'

However now I've upgraded and have ran all the updates on blunder, I'm getting the error:

但是现在我已经升级并且在错误中运行了所有更新,我收到错误:

uninitialized constant AWS::S3::Base

...when trying to establish a connection to S3.

...尝试建立与S3的连接时。

Does anyone know what this is happening and how to fix it. Thanks.

有谁知道这是怎么回事以及如何解决它。谢谢。

1 个解决方案

#1


3  

I know you said it doesn't have to do with Paperclip but are you also using Paperclip in addition to the s3 gem in your app? I don't think newer versions of Paperclip depend on the aws-s3 gem anymore and instead depend on the aws-sdk gem.

我知道你说它与Paperclip没有关系,但除了你的应用程序中的s3 gem之外,你还使用Paperclip吗?我认为Paperclip的新版本不再依赖于aws-s3 gem,而是依赖于aws-sdk gem。

Try replacing the aws-s3 gem with the aws-sdk gem.

尝试用aws-sdk gem替换aws-s3 gem。


分享到: