Problem with forgotten password

I’m getting the following problem after entering my email in the
"forgotten
password’ form. But, oddly it only happens in production mode, not
development mode. Any ideas?

—cut----
undefined method `errors’ for nil:NilClass

Extracted source (around line #4):

1:


2:

Forgotten Password


3:
4: <%= error_messages_for ‘user’ %>
5:
6:

7:

Enter your email address in the field below and click ‘Reset
Password’ to have instructions on how to retrieve your forgotten
password
emailed to you.

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace

./script/…/config/…/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb:106:in
error_messages_for' #{RAILS_ROOT}/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml:4 ./script/../config/../vendor/rails/actionpack/lib/action_view/base.rb:268:incompile_and_render_template’
./script/…/config/…/vendor/rails/actionpack/lib/action_view/base.rb:244:in
render_template' ./script/../config/../vendor/rails/actionpack/lib/action_view/base.rb:205:inrender_file’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:655:in
render_file' ./script/../config/../vendor/rails/actionpack/lib/action_controller/base.rb:595:inrender_with_no_layout’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/layout.rb:220:in
render_without_benchmark' ./script/../config/../vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:inrender’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' ./script/../config/../vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:inrender’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:854:in
`perform_action_without_filters’
./script/…/config/…/vendor/rails/actionpack/lib/action_contr

Does the path to the application on your production server contain any
hyphens or other punctuation characters? There’s a problem that was just
fixed in the trunk of the Engines plugin.

See UserEngine Bug #53 biting me - Engines - Ruby-Forum

The same thing was happening to me and this seems to have fixed it
completely.

It’s a one-line change to one file in the Engines plugin so it’s pretty
easy to test without having to install an entirely new version.

-sk

David C. wrote:

I’m getting the following problem after entering my email in the
"forgotten
password’ form. But, oddly it only happens in production mode, not
development mode. Any ideas?

—cut----
undefined method `errors’ for nil:NilClass

Extracted source (around line #4):

1:


2:

Forgotten Password


3:
4: <%= error_messages_for ‘user’ %>
5:
6:

7:

Enter your email address in the field below and click ‘Reset
Password’ to have instructions on how to retrieve your forgotten
password
emailed to you.

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace

./script/…/config/…/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb:106:in
error_messages_for' #{RAILS_ROOT}/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml:4 ./script/../config/../vendor/rails/actionpack/lib/action_view/base.rb:268:in compile_and_render_template’
./script/…/config/…/vendor/rails/actionpack/lib/action_view/base.rb:244:in
render_template' ./script/../config/../vendor/rails/actionpack/lib/action_view/base.rb:205:in render_file’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:655:in
render_file' ./script/../config/../vendor/rails/actionpack/lib/action_controller/base.rb:595:in render_with_no_layout’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/layout.rb:220:in
render_without_benchmark' ./script/../config/../vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in render’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' ./script/../config/../vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in render’
./script/…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:854:in
`perform_action_without_filters’
./script/…/config/…/vendor/rails/actionpack/lib/action_contr

On Wednesday 22 March 2006 07:58 am, Steve K. wrote:

Does the path to the application on your production server contain any
hyphens or other punctuation characters? There’s a problem that was just
fixed in the trunk of the Engines plugin.

See UserEngine Bug #53 biting me - Engines - Ruby-Forum

The same thing was happening to me and this seems to have fixed it
completely.

I think I accessed it as “localhost”, which would be ‘no’, but others
are
using an IP address. Will the IP address cause the problem too?

On Wednesday 22 March 2006 07:58 am, Steve K. wrote:

Does the path to the application on your production server contain any
hyphens or other punctuation characters? There’s a problem that was just
fixed in the trunk of the Engines plugin.

And actually, there is a colon because it’s running on a non standard
port.

OK. It turns out (I think) , it was failure to properly configure the
action_mailer for the production environment.

Thanks though.

No, not the URL. The path the files are located in.

For instance, maybe your app is in

/usr/local/railsapps/myapp

or if you’re on Windows

c:\railstuff\myapp

If any of the directory names leading up to your application files
contain a hyphen and possibly some other punctuation characters, that
would cause a problem like you describe, for which there is a simple fix
available.

The above directory paths wouldn’t have this problem, but these would:

/usr/local/rails-apps/myapp

or

c:\railstuff\my-app

Get it?

-sk

David C. wrote:

On Wednesday 22 March 2006 07:58 am, Steve K. wrote:

Does the path to the application on your production server contain any
hyphens or other punctuation characters? There’s a problem that was just
fixed in the trunk of the Engines plugin.

And actually, there is a colon because it’s running on a non standard
port.