Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error witth ActionView::Base.default_form_builder #102

Open
Ellyster opened this issue Sep 23, 2014 · 2 comments
Open

Error witth ActionView::Base.default_form_builder #102

Ellyster opened this issue Sep 23, 2014 · 2 comments

Comments

@Ellyster
Copy link

I wrongly reported it as a Devise bug, when is actually a aws-s3 bug:
heartcombo/devise#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.

@reynardmh
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants