# UserEngine Bug #53 biting me

**URL:** <https://www.ruby-forum.com/t/userengine-bug-53-biting-me/83047>\
**Category:** Engines\
**Created:** [March 17, 2006, 6:43am UTC](https://www.ruby-forum.com/t/userengine-bug-53-biting-me/83047 "2006-03-17T06:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hatless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@hatless](https://www.ruby-forum.com/u/hatless)\
**Post date:** [March 17, 2006, 6:43am UTC](https://www.ruby-forum.com/t/userengine-bug-53-biting-me/83047/1 "2006-03-17T06:43:00Z")

</div>

All right, so I finally sort of got UserEngine working on my production  
box and now I’m down to the path-related problems afflicting the  
user\_controller as seen in

[https://opensvn.csie.org/traccgi/rails\_engines/trac.cgi/ticket/53](https://opensvn.csie.org/traccgi/rails_engines/trac.cgi/ticket/53)

On the development PC there have been no problems at any stage.

On the production machine, it’s been one painful slog after another. By  
adhering strictly to the instructions in the README and explicitly  
setting a bunch of values that suppoosedly have defaults in  
environment.rb, my app finally started serving pages again.

But /usr/list and /user/edit horked. Per the ticket, I copied the  
user\_controller into the app and that got those two actions working.  
When on a /user/edit page it still horks when I attempt to set a new  
password, even for the currently logged in user. It seems as though the  
password changes OK but the /user/list called in the redirect is messed  
up. The error I get when I attempt to change password from /user/edit is  
below.

Both systems (Win32 for dev and FreeBSD for production) are running ruby  
1.8.2 and Rails 1.0.0. Engines are the release versions obtained less  
than 2 weeks ago via script\plugin install and were installed only on  
the dev box, where they got checked into my SVN with the rest of my  
code. The production box gets the app and all plugins and engines via a  
switchtower deployment.

I see in the ticket that some people are claiming success with specific  
non-current revs of the engines. What versions are we supposed to be  
using? Not the ones that get retrieved via default install?

NoMethodError in User#change\_password\_for\_user

undefined method `do\_change\_password\_for’ for  
#UserController:0x9a7427c

RAILS\_ROOT: /usr/local/myapp/current/public/…/config/…  
Application Trace | Framework Trace | Full Trace

#{RAILS\_ROOT}/app/controllers/user\_controller.rb:90:in  
`change\_password\_for\_user’

---

<div class="post-metadata">

**Author:** ![hatless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@hatless](https://www.ruby-forum.com/u/hatless)\
**Post date:** [March 17, 2006, 11:55pm UTC](https://www.ruby-forum.com/t/userengine-bug-53-biting-me/83047/2 "2006-03-17T23:55:50Z")

</div>

I’ll continue talking to myself until I get this all fixed. Hopefully  
it’ll be educational for someone.

All my problems may well have been caused by the bug documented in

[https://opensvn.csie.org/traccgi/rails\_engines/trac.cgi/ticket/53](https://opensvn.csie.org/traccgi/rails_engines/trac.cgi/ticket/53)

And a comment to the ticket dated February 12 contained a fax that seems  
to work. It is a change to /lib/engines/dependencies\_extensions.rb in  
Engines. A \W needs to be added to the line that reads

processed\_file\_name = file\_name.gsub(/[\w/.]\*app/#{type}s//, ‘’)

so that it instead reads

processed\_file\_name = file\_name.gsub(/[\w\W/.]\*app/#{type}s//, ‘’)

This fixes problems with paths containing “-”. Which indeed applied to  
my production server.

Since Engines has moved to a new server and the Trac has been abandoned  
in favor of a new Collaboa bugtracker, maybe nobody’s looking on the  
Trac anymore, but it’s still up and running and people are posting  
comments and fixes to open issues there.

I checked the relevant line in the current trunk and it still appears  
not to have been fixed. Maybe once I confirm everything really is  
working now, I’ll submit a one-line patch.

Steve K. wrote:

> All right, so I finally sort of got UserEngine working on my production  
> box and now I’m down to the path-related problems afflicting the  
> user\_controller as seen in
> 
> [https://opensvn.csie.org/traccgi/rails\_engines/trac.cgi/ticket/53](https://opensvn.csie.org/traccgi/rails_engines/trac.cgi/ticket/53)
> 
> On the development PC there have been no problems at any stage.
> 
> On the production machine, it’s been one painful slog after another. By  
> adhering strictly to the instructions in the README and explicitly  
> setting a bunch of values that suppoosedly have defaults in  
> environment.rb, my app finally started serving pages again.
> 
> But /usr/list and /user/edit horked. Per the ticket, I copied the  
> user\_controller into the app and that got those two actions working.  
> When on a /user/edit page it still horks when I attempt to set a new  
> password, even for the currently logged in user. It seems as though the  
> password changes OK but the /user/list called in the redirect is messed  
> up. The error I get when I attempt to change password from /user/edit is  
> below.
> 
> Both systems (Win32 for dev and FreeBSD for production) are running ruby  
> 1.8.2 and Rails 1.0.0. Engines are the release versions obtained less  
> than 2 weeks ago via script\plugin install and were installed only on  
> the dev box, where they got checked into my SVN with the rest of my  
> code. The production box gets the app and all plugins and engines via a  
> switchtower deployment.
> 
> I see in the ticket that some people are claiming success with specific  
> non-current revs of the engines. What versions are we supposed to be  
> using? Not the ones that get retrieved via default install?
> 
> NoMethodError in User#change\_password\_for\_user
> 
> undefined method `do\_change\_password\_for’ for  
> #UserController:0x9a7427c
> 
> RAILS\_ROOT: /usr/local/myapp/current/public/…/config/…  
> Application Trace | Framework Trace | Full Trace
> 
> #{RAILS\_ROOT}/app/controllers/user\_controller.rb:90:in  
> `change\_password\_for\_user’

---

<div class="post-metadata">

**Author:** ![hatless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@hatless](https://www.ruby-forum.com/u/hatless)\
**Post date:** [March 21, 2006, 2:24am UTC](https://www.ruby-forum.com/t/userengine-bug-53-biting-me/83047/3 "2006-03-21T02:24:40Z")

</div>

This has now been patched in the trunk version of the Engines plugin  
(which should work fine with Rails 1.0)

Apologies for the delay; the Trac site is still running (I need it  
active while I migrate the tickets across), but the Collaboa site is  
where all bugs and patches should be reported, even if this means  
creating a new ticket at the moment.

- james

On 3/17/06, Steve K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> in favor of a new Collaboa bugtracker, maybe nobody’s looking on the
> 
> > box and now I’m down to the path-related problems afflicting the
> > 
> > than 2 weeks ago via script\plugin install and were installed only on  
> > undefined method `do\_change\_password\_for’ for  
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> engine-users mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)

–

- J \*  
~
