UserEngine Bug #53 biting me

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

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’

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

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

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’

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. [email protected] 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/.


engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~