Forum: Ruby on Rails User Engine/General Engine issues

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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-11 20:13
(Received via mailing list)
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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-11 20:41
(Received via mailing list)
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
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2006-01-11 21:02
Nick Stuart 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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-11 21:41
(Received via mailing list)
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
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2006-01-11 21:50
Nick Stuart 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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-11 22:03
(Received via mailing list)
Heh, thats actually what I did. This app doesn't have anything BUT
these two engines. :(

And overriding the views and controller methods work, just not the
originals in user_engine.
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-11 22:09
(Received via mailing list)
People seem to be having issues here - I'm looking into it now...

- james
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-11 22:22
(Received via mailing list)
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! :)

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
C8a634a01a2c4508360874bff7fb1a7f?d=identicon&s=25 Kevin Olbrich (olbrich)
on 2006-01-11 23:12
James Adam 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
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-11 23:28
(Received via mailing list)
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
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-12 00:38
(Received via mailing list)
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. :)
C204883ecbdf04c9a5bc9b024f5ed575?d=identicon&s=25 Bill Pennington (Guest)
on 2006-01-12 03:34
(Received via mailing list)
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 Adam wrote:

>>> People seem to be having issues here - I'm looking into it now...
>>
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



- Bill
D4e51fd9554030ab55c379fdc1a34826?d=identicon&s=25 Keith Lancaster (klancaster)
on 2006-01-12 04:22
Bill Pennington 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 Adam wrote:
>
>>>> People seem to be having issues here - I'm looking into it now...
>>>
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
>
> - Bill

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

Keith
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-01-12 12:07
(Received via mailing list)
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
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-01-12 14:10
(Received via mailing list)
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. :(

-Nick

p.s. going to join the engines list and move the discussion over there
to avoid creating more traffic....
This topic is locked and can not be replied to.