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

Devise & AWS-S3 incompatibility #3220

Closed
Ellyster opened this issue Sep 23, 2014 · 4 comments
Closed

Devise & AWS-S3 incompatibility #3220

Ellyster opened this issue Sep 23, 2014 · 4 comments

Comments

@Ellyster
Copy link

I think this issue is completely different to #985

When using:

Using rails 4.1.4
Using warden 1.2.3
Using devise 3.3.0

If I add:

Using aws-s3 0.6.3

I get NoMethodError errors in both Devise::Sessions#new and Devise::Registrations#new:

Showing /Example/app/views/devise/registrations/new.html.erb where line 17 raised: undefined method `new' for nil:NilClass

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), :html => {class: 'well', id:'signup'}) do |f| %>

Showing /Example/app/views/devise/sessions/new.html.erb where line 14 raised: undefined method `new' for nil:NilClass

<%= form_for(resource, as: resource_name, url: session_path(resource_name), :html => {class: 'well', id:'login'}) do |f| %>
@lucasmazza
Copy link
Contributor

Can you please provide a sample application that reproduces the error?

@Ellyster
Copy link
Author

Sure!

I just finished it:
https://github.com/Ellyster/DeviseBugExample

@lucasmazza
Copy link
Contributor

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

Right!
Just done in marcel/aws-s3#102

Thanks :)

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

No branches or pull requests

2 participants