User Engine/General Engine issues

I’m trying to get the login/user engine combo up and working and am
having difficulties. I got the login engine up and running fine, no
problems. Now, on to the user engine.

After fixing the needed stuff in the bootstrap task so it loads I’m
able to login as the default admin ok. BUT none of the
views/controllers that are in login/user_controller are being
overridden by the user/user_controller, infact, the user_engine
controller doesn’t seem to be getting called at all!

If I try to do a /user/list it tries to show the right view, but
complains the the @content_columns are null, because the action method
never got called. I put a simple puts("%%%%%%%%") in the
user/user_controller, but nothing ever got spit out. If I put a list
method in the login/user_controller and print something out, it shows.

Some magic isn’t working right it seems. Any ideas on this? Thanks for
the help!
-Nick

p.s. And yes, I’m starting the user engine after the login engine, as
stated by the readme, and everything else was done according to that.

Some more info:

As I said before, none of the user_engine stuff is really getting
used, but if I put my own views/controller in they are called just
fine. Replacing them seems to work, but its not working with the
defaults…hmmm…

I just installed the engines today, so I dont know if anything has
changed in SVN recently but at the moment this combo doesn’t appear to
be working as intended.

-Nick

Thats a good write Ross, and great for understanding the idea behind
the engines, but it doesn’t help much with getting them up and running
correctly. =\

I managed to get the list view working by copying the
user_controller.rb from user_engine to my app/controllers dir, but now
the edit action doesn’t work. Gets stuck in an infinite loop.

Something in the class loading isn’t working right with the engines it
appears and as such is causing me problems.

-Nick

Nick S. wrote:

Some more info:

As I said before, none of the user_engine stuff is really getting
used, but if I put my own views/controller in they are called just
fine. Replacing them seems to work, but its not working with the
defaults…hmmm…

I just installed the engines today, so I dont know if anything has
changed in SVN recently but at the moment this combo doesn’t appear to
be working as intended.

-Nick

Not sure if this addresses the issue, but I posted a wiki entry at:
http://wiki.rubyonrails.org/rails/pages/HowToUseUserEngine describing my
experiences. Feel free to edit at will.

Heh, thats actually what I did. This app doesn’t have anything BUT
these two engines. :frowning:

And overriding the views and controller methods work, just not the
originals in user_engine.

Nick S. wrote:

Thats a good write Ross, and great for understanding the idea behind
the engines, but it doesn’t help much with getting them up and running
correctly. =\

I managed to get the list view working by copying the
user_controller.rb from user_engine to my app/controllers dir, but now
the edit action doesn’t work. Gets stuck in an infinite loop.

Something in the class loading isn’t working right with the engines it
appears and as such is causing me problems.

-Nick

I would suggest you create a toy app from scratch and pop the engines
into it. Create a toy model/controller/view (I know it’s supposed to be
model/view/controller :), edit your environment.rb file, then use:

before_filter :login_required, :only => [:foo]

or whatever you want to protect.

Now, you should be able to go to:

localhost:3000/myapp/user

If that works, then try overriding the list view.

If that works, try overriding one of the controller methods (perhaps
‘home’)

Compare your results with what’s in your app.

People seem to be having issues here - I’m looking into it now…

  • james

Cool James thanks! I think engines could be a great addition to a
project I want to start, and knowing they work the way you’ve
described them to would be great! :slight_smile:

Like I said, almost everything is working, just not one engine
over-riding another. Great work none the less!

I think the ability to pile engines on top of each other in order to
add or subtract functionality is a great idea and a lot closer to the
‘ideal’ plugin system in my mind.

-Nick

James A. wrote:

People seem to be having issues here - I’m looking into it now…

  • james

James,

For what it is worth, I’m using both the login and user engines with no
problems. However, I have not yet updated my ‘engines’ plugin to the
new version you just released. If there is a problem, it probably
resides there.

_Kevin

You’re spot on Kevin - it’s my module handling patch. In the meantime,
anyone who needs a fix NOW and isn’t developing an engine with
controllers in modules can use the original non-module version:

http://opensvn.csie.org/rails_engines/engines/tags/rel_1.0.1

  • james

Glad to hear you’ve found the trouble maker. At the moment I don’t
‘need’ this drastically at the moment, so I can wait. :slight_smile:

Thanks James I was having the same problem and pulling my hair out
all day. Older rev works fine!

On Jan 11, 2006, at 2:25 PM, James A. wrote:

People seem to be having issues here - I’m looking into it now…

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

  • Bill

Bill P. wrote:

Thanks James I was having the same problem and pulling my hair out
all day. Older rev works fine!

On Jan 11, 2006, at 2:25 PM, James A. wrote:

People seem to be having issues here - I’m looking into it now…

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

  • Bill

ME TOO!!! Thanks for looking at this - I was thinking I must be losing
it!

Keith

This bug should be fixed in the latest release of the engines plugin
(rel_1.0.4), available at:

http://opensvn.csie.org/rails_engines/engines/tags/rel_1.0.4
http://opensvn.csie.org/rails_engines/plugins/engines

I’m keen to avoid creating off-topic noise on the main Rails list with
issues like this particular one (although general discussion of
engines in the larger context of Rails would still seem appropriate
here), so I’d strongly urge people to subscribe to the
engine-users/engine-developers lists at rails-engines.org, or use the
forum gateway at www.ruby-forum.com.

Apologies!

  • james

I did a fresh check out of the engines plugin and its still acting the
same way. The list method in the user_engine controller isn’t getting
display, but the view is being called resulting in a nil value for the
content columns. :frowning:

-Nick

p.s. going to join the engines list and move the discussion over there
to avoid creating more traffic…