# Devise issue

**URL:** <https://www.ruby-forum.com/t/devise-issue/195210>\
**Category:** Rails\
**Created:** [September 19, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/devise-issue/195210 "2010-09-19T22:37:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@dgaj](https://www.ruby-forum.com/u/dgaj)\
**Post date:** [September 19, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/devise-issue/195210/1 "2010-09-19T22:37:58Z")

</div>

Devise is very powerful, but I am struggling to get it to do what I want

- I’m very new to rails so please forgive any stupidity in the below.

I followed the instructions on:

> **[Home](https://github.com/heartcombo/devise/wiki/)**
>
> Flexible authentication solution for Rails with Warden. - heartcombo/devise

– because I don’t want users to have to enter their current password  
every time they edit their user info (I store much more than just  
email/login details in the user object.

and also:

> **[Home](https://github.com/heartcombo/devise/wiki/)**
>
> Flexible authentication solution for Rails with Warden. - heartcombo/devise

I got it working by doing two additional things, first in routes.rb:

devise\_for :users, :controllers =\> { :registrations =\> “registrations” }

and secondly, after adding the above, I had to copy my  
devise/registrations views out to just views/registrations.

But now, on sign\_up I get a NoMethod error:

Started GET “/users/sign\_up” for 123.3.3.1 at Sat Sep 18 16:20:51 -0700  
2010  
Processing by RegistrationsController#new as HTML Completed in 49ms

NoMethodError (undefined method new\_with\_session’ for  
#Class:0x2afdd7d8de20):  
app/controllers/registrations\_controller.rb:67:inbuild\_resource’  
app/controllers/registrations\_controller.rb:8:in `new’

Any ideas? Thank you very much.

---

<div class="post-metadata">

**Author:** ![dgaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@dgaj](https://www.ruby-forum.com/u/dgaj)\
**Post date:** [September 19, 2010, 11:38pm UTC](https://www.ruby-forum.com/t/devise-issue/195210/2 "2010-09-19T23:38:34Z")

</div>

“I had to copy my  
devise/registrations views out to just views/registrations.”

did you do that in the gem? because you are suppose to use rails g  
devise\_views to do that

to edit without requiring a password put this in your user model

def password\_required?  
self.new\_record?  
end

---

<div class="post-metadata">

**Author:** ![dgaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@dgaj](https://www.ruby-forum.com/u/dgaj)\
**Post date:** [September 19, 2010, 11:56pm UTC](https://www.ruby-forum.com/t/devise-issue/195210/3 "2010-09-19T23:56:18Z")

</div>

radhames brito wrote:

> “I had to copy my  
> devise/registrations views out to just views/registrations.”
> 
> did you do that in the gem? because you are suppose to use rails g  
> devise\_views to do that
> 
> to edit without requiring a password put this in your user model
> 
> def password\_required?  
> self.new\_record?  
> end

Thanks for your reply.

That’s the whole problem, just

> def password\_required?  
> self.new\_record?  
> end

Does not work. See

> **[Home](https://github.com/heartcombo/devise/wiki/)**
>
> Flexible authentication solution for Rails with Warden. - heartcombo/devise

You have to make a change to the registration controller, which means  
copying it yourself, hence my problems above. Going around in circles on  
this, really frustrating. ☹

---

<div class="post-metadata">

**Author:** ![dgaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@dgaj](https://www.ruby-forum.com/u/dgaj)\
**Post date:** [September 20, 2010, 4:33am UTC](https://www.ruby-forum.com/t/devise-issue/195210/4 "2010-09-20T04:33:29Z")

</div>

Oh sorry i dont use the registration controller so maybe thats why i  
didnt  
know that
