Forum: Ruby on Rails Rails Engines + Login Engine

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.
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Bruno,

I have the same problem.
Did you figure it out?

-lv
D707194949c58eb4076f040adf116508?d=identicon&s=25 bruno.celeste (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Yes, my problem was in the engine_name/init_engine.rb file where there
was a 'require "my_engine_name"' , but I didn't take attention that I
didn't put a file named 'my_engine_name.rb' in engine_name/lib dir :/
So, if you don't need lib, you don't require the file in init_engine.rb.

I know it was stupid :D
Hope it helps!

2005/11/7, Lou Vanek:
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Not exactly sure what my problem is, but that wasn't it.
No error messages in log.
No nothing.
But works w/o login_engine, so maybe I'll leave it out for now.
Thanks.
-lv
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Lou, make sure you have the latest version from SVN - if you still
have problems, email me (off list) any messages from your log files
(/log/development.log, probably) and we'll figure it out.

-- james
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Ah - yes, I see the problem now. I'll have it fixed when I'm back in
the office later this morning.

Apologies for any inconvenice!

-- james
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
The LoginEngine should be working again, for anyone who has had
problems. The issue was caused by me making some slight changes to the
user model, moving the methods out into a module - the upshot being
that you can now create your own user model and just include the
LoginEngine::AuthenticatedUser module within it to get a resulting
Model object that plays nice with the rest of the LoginEngine code
(controllers, helpers, views).

To stop my klutzy committing causing problems like this again, I'm
thinking of re-structuring the plugin repository so we have proper
trunk/branches/tags directories in there. The reason why we didn't
have this from the beginning is because the plugin installer script
that's coming with Rails 1.0 didn't look like it was going to support
this kind of structure. However, it might have been updated in the
latest RC, so I'll inspect it again and see what the options are....


Again - apologies for breaking the code! D'oh!

- james
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
The reason why webbrick wouldn't start is because init_engine.rb and
login_engine.rb
are requiring two file that I don't have:

  . authenticated_user.rb
  . authenticated_system.rb

Nor could I find these two files in the tar.gz files posted at
rubyforge.
I'm using the LoginEngine svn HEAD.

Curiously, these two files are missing in the movie, too.

If I comment these two "require" files out webbrick starts but, not
surprisingly,
the "login_required" method cannot be found.

-lv

config:
	windows xp sp2
	cygwin
	ruby 1.8.3
	rails 0.14.3
	AR 1.13.0
	rake 0.6.2
	LoginEngine svn head
	TortoiseSVN 1.2.6
D707194949c58eb4076f040adf116508?d=identicon&s=25 bruno.celeste (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Finally, it was the same problem than mine :P
But, I don't understand why webrick doesn't complain when files are
missed..

2005/11/8, Lou Vanek:
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
That's pretty much what it was. Now that script/plugin seems to play
nice with plugins in SVN trunk/ directories, the LoginEngine will be
moving into that, to stop my development killing stable versions.

You incidentally also right to point out that the demo movie doesnt
feature these files - I'm continually working on making both the
engines plugin and the login system more flexible, and catching bugs
as I find them too (since the original LoginEngine was just a straight
port of the salted hash login generator, warts and all).

- james
D707194949c58eb4076f040adf116508?d=identicon&s=25 bruno.celeste (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Hi James,
I know it is a little bit off topic, but I wonder if a loginEngine
with role and permission would be in preparation? :P

2005/11/8, James Adam:
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
thanks, James, it works!

I checked out your new svn head a few minutes ago,
but I had to comment out one (actually two) lines:

   module AuthenticatedSystem

in the authenticated_system.rb file
or else I would get an error saying 'login_required' method not found.

-lv
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
It's because of the way plugins are loaded - all errors get swallowed
up. You should still see information in the log files though.
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
That's fixed now Lou - just update your files from SVN.
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Most of my errors show up in one of the log files, but when the
'require' wasn't
able to find those two missing files there was no mention of it in the
rails log file.
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-13 15:56
(Received via mailing list)
Works great.
I had to figure out where pstore puts its session files on a windows box
(Local Settings\Temp\ruby_sess*) so I could log out and retest logging
in.
But once I deleted those session files it worked first time.

Thanks,
Lou
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
As a warning to anyone using Engines with the very latest Rails - it
looks like the behaviour of the Rails code which I was overriding to
handle merging your applications controllers with Engine controllers
has changed, essentially breaking the code merging completely (views
shouldn't be affected though)..... I'm looking at how it can be fixed
at the moment.

- james
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 james.adam (Guest)
on 2005-11-13 15:56
(Received via mailing list)
The Engines plugin should work with edge Rails now - I'm not actually
sure what gave birth to the issue I was having, but I've tested it
against a fresh rails project and it runs as expected.

Of course, any problems, just let me know (off-list unless you have a
solution that might be useful to other people at the same time, this
thread is getting waaaay too long)

- james
This topic is locked and can not be replied to.