Rails 3 and AWS::S3 Ruby Gem

I am following the documentation (http://amazon.rubyforge.org/) to try to begin working on S3 into my application (for serving files to the end user) but I keep running into errors.

Here is my Model:

class File < AWS::S3::S3Object
  set_current_bucket_to 'test-bucket'

This is what I am trying via the Rails Console:

File.find 'test.pdf'

But I keep getting this error:

undefined method `find' for File:Class

Not sure what I am doing wrong here... anyone else run into this issue?


File is not a very good name for your model as it gets overwrited by Ruby's standart class File (docs). Just choose another name and everything will just work!

Need Your Help

Find files which have certain attributes

linux shell command-line find

I'd like to find all files in the current directory recursively with the following attributes:

Chrome/jQuery Uncaught RangeError: Maximum call stack size exceeded (Function Loop)

javascript jquery

so i'm quite puzzled how this is happening but my jQuery is somehow causing some kind of conflict and racking up the memory use to over 1.2gbs for that one tab.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.