Forum: Rails Engines user_controller functional tests failing

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
183c4c4431262d2eb34f8a68a93e29d3?d=identicon&s=25 Britton Nielsen (Guest)
on 2006-01-11 20:34
I believe I have setup and configured both the login and user engines
correctly, yet when I run the user_controller.rb functional test in
either engine I get the following...

C:/rails/login_user_test/vendor/plugins/user_engine/app/controllers/user_control
ler.rb:41: undefined method `edit' for class `UserController'
(NameError)
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:214:in `require'
        from
C:/rails/login_user_test/config/../vendor/plugins/engines/lib/depen
dencies_extensions.rb:59:in `require_or_load'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:22:in `depend_on'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:178:in `require_dependency'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:178:in `require_dependency'
        from
vendor/plugins/user_engine/test/functional/user_controller_test.rb:
2

Please advise.  Thanks for you time.
-Britton
Ed5facbfa0a54d5cc4d2af9fc98d46b6?d=identicon&s=25 Tim Greiser (tgreiser)
on 2006-01-11 21:04
Britton Nielsen wrote:
> I believe I have setup and configured both the login and user engines
> correctly, yet when I run the user_controller.rb functional test in
> either engine I get the following...
>
> C:/rails/login_user_test/vendor/plugins/user_engine/app/controllers/user_control
> ler.rb:41: undefined method `edit' for class `UserController'
> (NameError)


This error indicates you are trying to load user_engine before
login_engine.  user_engine tries to setup an alias for the edit action
and it errors when that action hasn't been loaded yet.  Make sure your
config/environment.rb has:

Engines.start :login, :user
183c4c4431262d2eb34f8a68a93e29d3?d=identicon&s=25 Britton Nielsen (Guest)
on 2006-01-11 22:18
Tim Greiser wrote:
> This error indicates you are trying to load user_engine before
> login_engine.  user_engine tries to setup an alias for the edit action
> and it errors when that action hasn't been loaded yet.  Make sure your
> config/environment.rb has:
>
> Engines.start :login, :user

I checked and this is what I have in my config/environment.rb.  I am
also experiencing the sames issues you posted about in "Engine.start
order (user_engine)".

Thanks,
Britton
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-11 22:28
(Received via mailing list)
Some other people have reported this error (engines not loading
properly)... I'm looking into it tonight.

- james
183c4c4431262d2eb34f8a68a93e29d3?d=identicon&s=25 Britton Nielsen (Guest)
on 2006-01-11 23:44
James Adam wrote:
> Some other people have reported this error (engines not loading
> properly)... I'm looking into it tonight.
>
> - james

Thanks
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-12 12:16
(Received via mailing list)
These problems are caused by a slightly old version of the UserEngine
- if you grab the latest one, they should be fixed:

  http://opensvn.csie.org/rails_engines/user_engine/...
  http://opensvn.csie.org/rails_engines/plugins/user_engine

You'll probably want to update the engines plugin at the same time
(see earlier post on this list). Let me know if the problems continue.

- james
183c4c4431262d2eb34f8a68a93e29d3?d=identicon&s=25 Britton Nielsen (Guest)
on 2006-01-12 15:41
James Adam wrote:
> These problems are caused by a slightly old version of the UserEngine
> - if you grab the latest one, they should be fixed:
>
>   http://opensvn.csie.org/rails_engines/user_engine/...
>   http://opensvn.csie.org/rails_engines/plugins/user_engine
>
> You'll probably want to update the engines plugin at the same time
> (see earlier post on this list). Let me know if the problems continue.
>
> - james

The latest is 0.9.0 or 1.0.0?
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-12 15:50
(Received via mailing list)
This topic is locked and can not be replied to.