作者:曼珠沙華的朦朧_759 | 来源:互联网 | 2023-08-27 16:07
ImworkingonimplementinganAmazonS3uploaderformyrailsproject.我正在为我的rails项目实现一个AmazonS3上传
I'm working on implementing an Amazon S3 uploader for my rails project.
我正在为我的rails项目实现一个Amazon S3上传程序。
I'm trying to access a bucket so that I can assign all the images to a variable and list them.
我试图访问一个bucket,这样我就可以将所有的图像分配给一个变量并列出它们。
I keep getting the following error when I try to view my new action in my uploads controller:
当我试图在我的上传控制器中查看我的新动作时,我一直得到以下错误:
undefined method `find' for AWS::S3::Bucket:Class
Here is my uploads_controller.rb
这是我uploads_controller.rb
class UploadsController
The find method is documented here http://amazon.rubyforge.org/.
该查找方法记录在这里http://amazon.rubyforge.org/。
Any clue as to what is going on here?
有什么线索吗?
Thanks.
谢谢。
Here is my Gemfile:
这是我Gemfile:
gem 'paperclip'
gem 'aws-s3'
gem 'aws-sdk'
gem 'rails', '3.2.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'nokogiri'
gem 'kaminari'
gem 'acts-as-taggable-on', '~> 2.2.2'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem "friendly_id", "~> 4.0.1"
2 个解决方案