aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

Error witth ActionView::Base.default_form_builder

Open Ellyster opened this issue 10 years ago • 2 comments

I wrongly reported it as a Devise bug, when is actually a aws-s3 bug: https://github.com/plataformatec/devise/issues/3220

Looks like aws-s3 is messing with ActionView::Base.default_form_builder, that instead of returning ActionView::Helpers::FormBuilder is returning nil - this can be replicated by justing generating a scaffold in a fresh app with aws-s3, even without Devise.

Looks like aws-s3 is overriding the cattr_accessor method from ActiveSupport and breaking some Rails internals. I think this should be reported back to the aws-s3 repo and fixed and their end.

Ellyster avatar Sep 23 '14 23:09 Ellyster

I think it might be better to just remove the aws-s3 extension for adding cattr_* method and just add activesupport as a dependency.

This is causing problem if I just create new rails app and add aws-s3 gem, run bundle install and then rails c You'll get this

lib/aws/s3/extensions.rb:223:in `class_eval': ....
`@@{' is not allowed as a class variable name

reynardmh avatar Mar 18 '15 22:03 reynardmh

I created a forked version that address this. https://github.com/reynardmh/aws-s3 If you want to use this, you can just add to your Gemfile:

gem 'aws-s3', github: 'reynardmh/aws-s3'

I can create a pull request if you think this is a good idea to merge to the main branch.

reynardmh avatar Mar 19 '15 13:03 reynardmh