Announcing the birth of a bouncing plugin baby boy: http://rails-engines.rubyforge.org/ ... at which you can digest all manner of propaganda and rdoc.... well, docs. You might particularly want to watch the demo movie: http://rails-engines.rubyforge.org/movies/engines_intro.mov Any mirrors of this would be *greatly* appreciated! Below is the hype: What are Rails Engines? ================================Rails Engines are a way of dropping in whole chunks of functionality into your existing application without affecting any of your existing code. The could also be described as mini-applications, or vertical application slices - top-to-bottom units which provide full MVC coverage for a certain, specific application function. Why do I want this? ================================Rails Engines are advantageous over normal generators because the do not insert any code into the /app directory, but remain isolated within the plugins directory of your application. Furthermore, you can override individual controller actions and views/partials within your application as needed, whilst leaving the original Engine files intact. OK, I need an example ================================ As an example, the Login Engine (heavily based on the Salted Login Generator, all kudos to those guys) provides a full user login subsystem, including: * controllers to manage user accounts; * helpers for you to interact with account information from other parts of your application; * the model objects and schemas to create the required tables; * stylesheets and javascript files to enhance the views; * and any other library files required. How do I get such devilry? ================================Engines can be distributed using the same mechanisms as regular Rails plugins (since to the Rails plugin system they appear to be almost the same thing). If you are developing engines yourself for use across multiple projects, linking them as svn externals allows seamless updating of bugfixes across multiple applications. The Rails Engines plugin and all other engines should be listed on the Plugins page in the wiki, so that the bleeding-edge script/plugin command can be used to install them painlessly. Currently they are hosted on the OpenSVN servers at http://opensvn.csie.org/rails_engines/plugins, although a more permanent home would be make me very very happy.... </beg> http://wiki.rubyonrails.com/rails/pages/Plugins Comments? ================================This is a very first release of a plugin which tries to do something quite sweeping, so there are bound to be bugs! Please submit all your comments, etc at the RubyForge project page: http://rubyforge.org/projects/rails-engines/
Oops - correction to the SVN urls, they are now at https://opensvn.csie.org/rails_engines/plugins You''ll probably need to accept the self-certified gubbins as a result. Please, decent SVN hosting, someone? :) On 11/1/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Announcing the birth of a bouncing plugin baby boy: > > http://rails-engines.rubyforge.org/ > > ... at which you can digest all manner of propaganda and rdoc.... > well, docs. You might particularly want to watch the demo movie: > > http://rails-engines.rubyforge.org/movies/engines_intro.mov > > Any mirrors of this would be *greatly* appreciated! Below is the hype: > > > What are Rails Engines? > ================================> Rails Engines are a way of dropping in whole chunks of functionality > into your existing application without affecting any of your existing > code. The could also be described as mini-applications, or vertical > application slices - top-to-bottom units which provide full MVC > coverage for a certain, specific application function. > > > Why do I want this? > ================================> Rails Engines are advantageous over normal generators because the do > not insert any code into the /app directory, but remain isolated > within the plugins directory of your application. Furthermore, you can > override individual controller actions and views/partials within your > application as needed, whilst leaving the original Engine files > intact. > > > OK, I need an example > ================================> As an example, the Login Engine (heavily based on the Salted Login > Generator, all kudos to those guys) provides a full user login > subsystem, including: > * controllers to manage user accounts; > * helpers for you to interact with account information from other > parts of your application; > * the model objects and schemas to create the required tables; > * stylesheets and javascript files to enhance the views; > * and any other library files required. > > > How do I get such devilry? > ================================> Engines can be distributed using the same mechanisms as regular Rails > plugins (since to the Rails plugin system they appear to be almost the > same thing). If you are developing engines yourself for use across > multiple projects, linking them as svn externals allows seamless > updating of bugfixes across multiple applications. > > The Rails Engines plugin and all other engines should be listed on the > Plugins page in the wiki, so that the bleeding-edge script/plugin > command can be used to install them painlessly. > > Currently they are hosted on the OpenSVN servers at > http://opensvn.csie.org/rails_engines/plugins, although a more > permanent home would be make me very very happy.... </beg> > > http://wiki.rubyonrails.com/rails/pages/Plugins > > > Comments? > ================================> This is a very first release of a plugin which tries to do something > quite sweeping, so there are bound to be bugs! Please submit all your > comments, etc at the RubyForge project page: > > http://rubyforge.org/projects/rails-engines/ >
(apologies for the repost, the list seemed broken when I sent this last...) http://rails-engines.rubyforge.org/ ... at which you can digest all manner of propaganda and rdoc.... well, docs. You might particularly want to watch the demo movie: http://rails-engines.rubyforge.org/movies/engines_intro.mov (36MB Quicktime, soon to be revised and re-encoded into a smaller file) http://www.lazyatom.com/media/video/engines_intro_h.264.mov (16MB, QT 7 only) Any mirrors of this would be *greatly* appreciated! Below is the hype: What are Rails Engines? ================================Rails Engines are a way of dropping in whole chunks of functionality into your existing application without affecting any of your existing code. The could also be described as mini-applications, or vertical application slices - top-to-bottom units which provide full MVC coverage for a certain, specific application function. Why do I want this? ================================Rails Engines are advantageous over normal generators because the do not insert any code into the /app directory, but remain isolated within the plugins directory of your application. Furthermore, you can override individual controller actions and views/partials within your application as needed, whilst leaving the original Engine files intact. OK, I need an example ================================ As an example, the Login Engine (heavily based on the Salted Login Generator, all kudos to those guys) provides a full user login subsystem, including: * controllers to manage user accounts; * helpers for you to interact with account information from other parts of your application; * the model objects and schemas to create the required tables; * views for all the controller methods * stylesheets to enhance the views; * and any other library files required. ... it''s basically everything you need to add a simple login mechanism to your Rails app. How do I get such devilry? ================================Engines can be distributed using the same mechanisms as regular Rails plugins (since to the Rails plugin system they appear to be almost the same thing). If you are developing engines yourself for use across multiple projects, linking them as svn externals allows seamless updating of bugfixes across multiple applications. The Rails Engines plugin and all other engines should be listed on the Plugins page in the wiki, so that the bleeding-edge script/plugin command can be used to install them painlessly. Currently they are hosted on the OpenSVN servers at https://opensvn.csie.org/rails_engines/plugins, although a more permanent, svn-savvy home would be make me very very happy.... </beg> http://wiki.rubyonrails.com/rails/pages/Plugins Comments? ================================This is a very first release of a plugin which tries to do something quite sweeping, so there are bound to be bugs! Please submit all your comments, etc either directly to me (james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) or at the RubyForge project page: http://rubyforge.org/projects/rails-engines/
Sweet stuff! "most coolest" plugin yet =D Nice :) (Sorry have nothing more helpful to contribute =p)
In article <41699B0F-50BC-4ABB-9F41-44E3DE6B6ACB-KK0ffGbhmjU@public.gmane.org>, mannl- KK0ffGbhmjU-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> Sweet stuff! > > "most coolest" plugin yet =DSeriously. Between basic plugins and full-fledged engines, we''ve got all the modularity we need... now if we could get some agreement in APIs between ActiveRBAC and ModelSecurity... :) Jay -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
I just watched the video.. amazing. great job! Go see it !! GO GO GO! http://rails-engines.rubyforge.org/ On 11/1/05, Jay Levitt <jay-news-WxwZQdyI2t0@public.gmane.org> wrote:> In article <41699B0F-50BC-4ABB-9F41-44E3DE6B6ACB-KK0ffGbhmjU@public.gmane.org>, mannl- > KK0ffGbhmjU-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says... > > Sweet stuff! > > > > "most coolest" plugin yet =D > > Seriously. Between basic plugins and full-fledged engines, we''ve got > all the modularity we need... now if we could get some agreement in APIs > between ActiveRBAC and ModelSecurity... :) > > Jay > -- > Jay Levitt | > Wellesley, MA | I feel calm. I feel ready. I can only > Faster: jay at jay dot fm | conclude that''s because I don''t have a > http://www.jay.fm | full grasp of the situation. - Mark Adler > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- - Ramin http://www.getintothis.com/blog
This is just awesome. This provides the answer for reusing controllers, models, views, etc. And you can override them all. This is the real answer to the reuse question. I just tried the login engine, and it totally works, easy! wowee zowee... Scott -- Scott Becker Web Developer Electro Interactive www.ElectroInteractive.com <http://www.ElectroInteractive.com> _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Looks like the rubyforge site trickles the video through the internet. I''ve cut & pasted current mirrors from the rubyforge wiki below. www.billkatz.com/videos/engines_intro.mov<http://www.billkatz.com/videos/engines_intro.mov> www.billkatz.com/videos/engines_intro_h.264.mov<http://www.billkatz.com/videos/engines_intro_h.264.mov><-- Quicktime 7 only, but 16MB. 68c5a075138d91c61bc5c22b2af01a33 engines_intro.mov www.lazyatom.com/media/video/engines_intro.mov<http://www.lazyatom.com/media/video/engines_intro.mov> www.lazyatom.com/media/video/engines_intro_h.264.mov<http://www.lazyatom.com/media/video/engines_intro_h.264.mov><-- Quicktime 7 only, but 16MB. rails-engines.rubyforge.org/movies/engines_intro.mov<http://rails-engines.rubyforge.org/movies/engines_intro.mov> www.teksol.info/engines_intro.mov <http://www.teksol.info/engines_intro.mov>(François Beausoleil, International Technological Solutions) magnet:?xt=urn:bitprint: ORL2MV6WODOJWUKAJINSKCUAQSEUH65F.CHJX4OBW7HCK4PIHRFAH6DLXROZXYED34IOJT7I&dn=engines_intro.mov ed2k://|file|engines_intro.mov|38320240|20e5486e34e0c69802012fb615aa86b1|/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Well done getting this out, James. Looks absolutely brilliant. Tom -- email : tom at popdog.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Yes, it''s really cool, I expected that for a long time :D, The video is amazing and simple. Good work. But, I have a question about the environment.rb. Is there a way to start automatically all the engines? Because, it could be very cool to just unzip the plugin into the dir and stop! No need to edit any additionaly files, etc.. Maybe it is already possible, I will try in couple hours ;) Thank you!
It''s certainly possible to automatically start all the Engines, but the issue is that with the current Rails plugin-loading mechanism, this process might happen before other plugins havae loaded... so if an Engine depends on a plugin (which will almost certainly be the case for some of the Engines I have planned), there will be load problems....>From another perspective, it''s good to have some mechanism of controlfor exactly which parts of a system are loaded during development, so I wouldn''t want to lose the ability to selectively use individual Engines. If I can come up with a reasonably simple dependencies mechanism for plugins, then it should be possible to have engines start automatically as a default. What I might add in the interim is an Engines.start_all method, or possible Engines.start (with no arguments), which will start all of the engine plugins it finds. How does that sound? - james On 11/2/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, it''s really cool, I expected that for a long time :D, The video > is amazing and simple. Good work. > But, I have a question about the environment.rb. Is there a way to > start automatically all the engines? Because, it could be very cool to > just unzip the plugin into the dir and stop! No need to edit any > additionaly files, etc.. Maybe it is already possible, I will try in > couple hours ;) > > Thank you! > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Thanks! these engines are great - this is the most excited i''ve been since finding rails. at last there are stuff that kan ride the rails.
Thank you to answer my question! I think you are right. With a method like Engines.start, you let the choice to developer, so I completely agree with this approch. Also, if I understand well, the controller,view.. in the plugins place are loaded before the traditionnal app/views|controllers etc.. so, to overwrite a method you have to change it in the traditionnal place. It is good when I want to change a behavior in an existing plugin, but if I want to overwrite a method which is in the core app, it won''t work.. It would be good to overwrite method in this sense.. For example, without change any line of the typo core project, I could customize views, controllers etc.. I think, it is more logic, maybe not :) I don''t know if I''m clear :D 2005/11/2, James Adam:> It''s certainly possible to automatically start all the Engines, but > the issue is that with the current Rails plugin-loading mechanism, > this process might happen before other plugins havae loaded... so if > an Engine depends on a plugin (which will almost certainly be the case > for some of the Engines I have planned), there will be load > problems.... > > From another perspective, it''s good to have some mechanism of control > for exactly which parts of a system are loaded during development, so > I wouldn''t want to lose the ability to selectively use individual > Engines. > > If I can come up with a reasonably simple dependencies mechanism for > plugins, then it should be possible to have engines start > automatically as a default. What I might add in the interim is an > Engines.start_all method, or possible Engines.start (with no > arguments), which will start all of the engine plugins it finds. How > does that sound? > > - james > > On 11/2/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Yes, it''s really cool, I expected that for a long time :D, The video > > is amazing and simple. Good work. > > But, I have a question about the environment.rb. Is there a way to > > start automatically all the engines? Because, it could be very cool to > > just unzip the plugin into the dir and stop! No need to edit any > > additionaly files, etc.. Maybe it is already possible, I will try in > > couple hours ;) > > > > Thank you! > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >
Yes, You understood me :) Of course if I am the developer of the whole app, but if it is another app like typo or whatever, I want to just unzip the plugin in the right place and that''s all.. I don''t want to hack the core app, because if I want to redistribute my changes, it could be a nightmare to edit pieces of code in each files :) Maybe I''m wrong, I just give you my idea :D 2005/11/2, James Adam:> Do you mean that sometimes you might want a method from an Engine (or > plugin) be used instead of something in your /app directory? > > I''m not sure that it makes too much sense to ever do that - after all, > you as The Developer are responsible for the code in /app, and if you > would rather delegate that functionality to an Engine or plugin, you > have the means to achieve that just by editing your own code (changing > a method name or removing your own method entirely)... > > james
It''s an interesting case - probably what will happen in the future is that controllers/views in engines might be in modules, thus removing the likelihood that anything in your application will override any of the Engine controller methods. So, if you dropped in a Typo engine, it''s actions might appear under a /typo url... maybe... - james On 11/2/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, You understood me :) > Of course if I am the developer of the whole app, but if it is another > app like typo or whatever, I want to just unzip the plugin in the > right place and that''s all.. I don''t want to hack the core app, > because if I want to redistribute my changes, it could be a nightmare > to edit pieces of code in each files :) > > Maybe I''m wrong, I just give you my idea :D > > > 2005/11/2, James Adam: > > Do you mean that sometimes you might want a method from an Engine (or > > plugin) be used instead of something in your /app directory? > > > > I''m not sure that it makes too much sense to ever do that - after all, > > you as The Developer are responsible for the code in /app, and if you > > would rather delegate that functionality to an Engine or plugin, you > > have the means to achieve that just by editing your own code (changing > > a method name or removing your own method entirely)... > > > > james > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Ok James, thank you. I am currently testing your engine and I get an issue starting webrick.. I wrote my own engine, the simpliest in fact, just one controller with an index method def index render :text => "ok",:layout => false end My controller''s name is Annu and the dir plugin is annu_engine. In my environment.rb, I put: Engines.start ''annu_engine'' The engine is loaded succesfully, in log file, I have: Starting engine ''annu_engine'' from ''/home/sadik/ruby/rails/engine/vendor/plugins/annu_engine'' adding /home/sadik/ruby/rails/engine/lib to the load path adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine to the load path adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/helpers to the load path adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/models to the load path adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/controllers to the load path But webrick doesn''t say anything, I launch it and it exits without spit a piece of word :/ Clearly, the server doesn''t start, nothing appear in the log file, so maybe you know what appened. Thank you 2005/11/2, James Adam:> It''s an interesting case - probably what will happen in the future is > that controllers/views in engines might be in modules, thus removing > the likelihood that anything in your application will override any of > the Engine controller methods. > > So, if you dropped in a Typo engine, it''s actions might appear under a > /typo url... maybe...
Bruno Did you include an init_engine.rb file? There are issues with engines (and plugins) which fail to load because of the use of eval(IO.read(....)), I believe, but I''m adding some more error checking so at least you''ll get more sensible error messages. It would be helpful if you could email me your engine directory structure (just to me personally) and we''ll sort it out... James On 11/2/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok James, thank you. > > I am currently testing your engine and I get an issue starting webrick.. > I wrote my own engine, the simpliest in fact, just one controller with > an index method > > def index > render :text => "ok",:layout => false > end > > My controller''s name is Annu and the dir plugin is annu_engine. In my > environment.rb, I put: > Engines.start ''annu_engine'' > > The engine is loaded succesfully, in log file, I have: > > Starting engine ''annu_engine'' from > ''/home/sadik/ruby/rails/engine/vendor/plugins/annu_engine'' > adding /home/sadik/ruby/rails/engine/lib to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/helpers > to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/models > to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/controllers > to the load path > > But webrick doesn''t say anything, I launch it and it exits without > spit a piece of word :/ Clearly, the server doesn''t start, nothing > appear in the log file, so maybe you know what appened. > > Thank you > > 2005/11/2, James Adam: > > It''s an interesting case - probably what will happen in the future is > > that controllers/views in engines might be in modules, thus removing > > the likelihood that anything in your application will override any of > > the Engine controller methods. > > > > So, if you dropped in a Typo engine, it''s actions might appear under a > > /typo url... maybe... >
Hi I''ve been playing around with your new plugin and I like it a lot! Definitely fills a gap that needed filling. Just a couple of things I picked up with the login_engine: * the docs indicate that one should store a :salt value. However, in the code it looks for a :Salt value. Just a potential point of confusion (it had me going for a while). So one or the other should be changed. * with the flash messages, they are all stored as flash[''mesage''].>From what I''ve seen (scaffold generator, Agile book), the conventionis flash[:message], using symbols and not strings. This is an issue as they are not interchangeable. Therefore, if you want to be able to drop in engines and expect them to work they should all use the same. Therefore, I think it should probably be changed to tie in with the (apparent) standard. I know that at least the flash issue is most likely carried forward from your port of the salted login generator, but thought I''d mention it. Your work on having drop-in engines actually raises a larger issue (at least for me). With most Rails apps that I develop I have a few standard flash types, such as :notice and :warning. This means that I can distinguish between the two and using CSS display them differently (to reflect the different nature of the message, ie red for warning, green for notice). However, with new engines, the engine author might use different names for the flash messages (such as notice and message in the login engine). Therefore, I think it would be worthwhile to standardise on a few flash message names, so that when you drop in a new engine all the flash messages automatically slot into your layout. So for example we might have :message for neutral messages, :warning for negative (or error) messages and :notice for postive (or success related) messages. This is obviously more to illustrate the point than being the definitive list of what they should be. What do you think of this? Do other people handle it in a way that I haven''t thought of? Sorry, I wrote this in a bit of a hurry so it might be somewhat unclear what I mean. If it is please tell me and I''ll be happy to try and explain it better. Luke
I keep getting this error? $ ./script/plugin install -x http://opensvn.csie.org/rails_engines/plugins/engines ./script/plugin:662:in `initialize'': wrong number of arguments (1 for 0) (ArgumentError) from ./script/plugin:662:in `parse!'' from ./script/plugin:660:in `parse!'' from ./script/plugin:374:in `parse!'' from ./script/plugin:390:in `parse!'' from ./script/plugin:741
Download the tar.gz directly on the website ;) 2005/11/2, PJ Hyett:> I keep getting this error? > > $ ./script/plugin install -x > http://opensvn.csie.org/rails_engines/plugins/engines > ./script/plugin:662:in `initialize'': wrong number of arguments (1 for > 0) (ArgumentError) > from ./script/plugin:662:in `parse!'' > from ./script/plugin:660:in `parse!'' > from ./script/plugin:374:in `parse!'' > from ./script/plugin:390:in `parse!'' > from ./script/plugin:741
The latest version will *always* be available from the SVN, so bear this in mind... the tar.gz packages will always be a little out of date... james On 11/2/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Download the tar.gz directly on the website ;) > > 2005/11/2, PJ Hyett: > > I keep getting this error? > > > > $ ./script/plugin install -x > > http://opensvn.csie.org/rails_engines/plugins/engines > > ./script/plugin:662:in `initialize'': wrong number of arguments (1 for > > 0) (ArgumentError) > > from ./script/plugin:662:in `parse!'' > > from ./script/plugin:660:in `parse!'' > > from ./script/plugin:374:in `parse!'' > > from ./script/plugin:390:in `parse!'' > > from ./script/plugin:741 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hmm... that''s odd :-S The error seems to be in the plugin script You should probably note that the SVN url has changed to https://opensvn.csie.org/rails_engines/plugins - note the HTTPS part there. Which version of rails are you using? - james On 11/2/05, PJ Hyett <pjhyett-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I keep getting this error? > > $ ./script/plugin install -x > http://opensvn.csie.org/rails_engines/plugins/engines > ./script/plugin:662:in `initialize'': wrong number of arguments (1 for > 0) (ArgumentError) > from ./script/plugin:662:in `parse!'' > from ./script/plugin:660:in `parse!'' > from ./script/plugin:374:in `parse!'' > from ./script/plugin:390:in `parse!'' > from ./script/plugin:741 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi Randal:> * the docs indicate that one should store a :salt value. However, in > the code it looks for a :Salt value. Just a potential point of > confusion (it had me going for a while). So one or the other should be > changed.Yeah - the CamelCase options in LoginEngine are now :rails_style, please grab the latest copy from the SVN repository. This does make the movie somewhat outdated, but the docs do reflect the latest code behaviour. Apologies for this minor hiccup *embarassed*> * with the flash messages, they are all stored as flash[''mesage'']. > >From what I''ve seen (scaffold generator, Agile book), the convention > is flash[:message], using symbols and not strings. This is an issue as > they are not interchangeable. Therefore, if you want to be able to > drop in engines and expect them to work they should all use the same. > Therefore, I think it should probably be changed to tie in with the > (apparent) standard.I agree, completely, and the change will be made. You''re right, I was just keen to get the LoginEngine "out", so I didn''t make a lot of the changes I could''ve to improve the style. If anyone wants to submit a .diff in the meantime, I''m more than happy to fold it into the code - one of the main motivations for me behind moving from generators to Engines is letting the community inspect, criticise and of course update code we''re all likely to use at some point.> I think it would be worthwhile to > standardise on a few flash message names, so that when you drop in a > new engine all the flash messages automatically slot into your layout.Another excellent point - when you''re dropping in people''s [r]html code, you''re taking a big leap of faith that their layouts will be sensible, good DIV ids and CSS class names will be used, and probably a whole heap more. The first (and possibly most important) step would be flesh out the documentation in the LoginEngine so it leads by example and clearly explains what it might ever place in the flash, and also ensuring that any styling it uses is sane and/or clearly explained. Anyone want to help out with that? - james
On 11/1/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Announcing the birth of a bouncing plugin baby boy: > > http://rails-engines.rubyforge.org/ >Great Job! I have just watched the video and it seems very powerful and useful. What happens if the user just types the path to a certain part of the application? Does it automatically forward him to the login page? Cheers, Ed -- Encontrá a "Tu psicópata favorito" http://tuxmaniac.blogspot.com Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive. -- Seventh commandment for C programmers
Running .14.2 and same error with https. -PJ On 11/2/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm... that''s odd :-S The error seems to be in the plugin script > > You should probably note that the SVN url has changed to > https://opensvn.csie.org/rails_engines/plugins - note the HTTPS part > there. Which version of rails are you using? > > - james > > On 11/2/05, PJ Hyett <pjhyett-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I keep getting this error? > > > > $ ./script/plugin install -x > > http://opensvn.csie.org/rails_engines/plugins/engines > > ./script/plugin:662:in `initialize'': wrong number of arguments (1 for > > 0) (ArgumentError) > > from ./script/plugin:662:in `parse!'' > > from ./script/plugin:660:in `parse!'' > > from ./script/plugin:374:in `parse!'' > > from ./script/plugin:390:in `parse!'' > > from ./script/plugin:741 > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi Edgardo - It behaves the same way as the Salted Hash Login Generator (since it''s essentially the same code :)), so yes - if, for instance, you tried to go to http://yoursite/user/edit without being logged in, you will be sent to http://yoursite/user/login You can change which actions are accessible without logging in as described in the README in the docs (http://rails- engines.rubyforge.org/rdoc/login_engine). Hope this helps! On 2 Nov 2005, at 20:27, Edgardo Hames wrote:> Great Job! I have just watched the video and it seems very powerful > and useful. > What happens if the user just types the path to a certain part of the > application? Does it automatically forward him to the login page?
I''ve only ever seen a similar error when I mistyped the URI for the SVN repository... In my copy (trunk Rails checked out a few days ago) there isn''t any line of incriminating code on line 662 of plugin.rb either. Hmm - tricky indeed... My only thought is that perhaps you didn''t accept the SSL certificate from OpenSVN.csie.org at some point? In the mean time I''ve updated the .tar.gz files on the RubyForge page: http://rubyforge.org/frs/?group_id=1050 Hope this helps.... On 11/2/05, PJ Hyett <pjhyett-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Running .14.2 and same error with https. > > -PJ > > On 11/2/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hmm... that''s odd :-S The error seems to be in the plugin script > > > > You should probably note that the SVN url has changed to > > https://opensvn.csie.org/rails_engines/plugins - note the HTTPS part > > there. Which version of rails are you using? > > > > - james > > > > On 11/2/05, PJ Hyett <pjhyett-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I keep getting this error? > > > > > > $ ./script/plugin install -x > > > http://opensvn.csie.org/rails_engines/plugins/engines > > > ./script/plugin:662:in `initialize'': wrong number of arguments (1 for > > > 0) (ArgumentError) > > > from ./script/plugin:662:in `parse!'' > > > from ./script/plugin:660:in `parse!'' > > > from ./script/plugin:374:in `parse!'' > > > from ./script/plugin:390:in `parse!'' > > > from ./script/plugin:741 > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I''m having trouble getting the login_engine stylesheet to load in my application.rhtml layout file. I have the following line added to the head of my document: <%= engine_stylesheet ''login_engine'' %> Am I missing something? Another unrelated question.. I used the Rails plugin install method to install both the Engines plugin as well as the login_engine. Is there a better way to do this using SVN, so that I can always be up to date (kinda like how I have using SVN external to get Edge Rails)? And will the Rails pluing installer always grab the latest version if you run it again? Thank you! On 11/2/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Edgardo - > > It behaves the same way as the Salted Hash Login Generator (since > it''s essentially the same code :)), so yes - if, for instance, you > tried to go to http://yoursite/user/edit without being logged in, you > will be sent to http://yoursite/user/login > > You can change which actions are accessible without logging in as > described in the README in the docs (http://rails- > engines.rubyforge.org/rdoc/login_engine)<http://engines.rubyforge.org/rdoc/login_engine)> > . > > Hope this helps! > > On 2 Nov 2005, at 20:27, Edgardo Hames wrote: > > > Great Job! I have just watched the video and it seems very powerful > > and useful. > > What happens if the user just types the path to a certain part of the > > application? Does it automatically forward him to the login page? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- - Ramin http://www.getintothis.com/blog _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I printed out some debugging infromation to try and figure out why the stylesheet wasn''t being included. It seems like the stylesheets are expected to be in the following location: /public/engine_files/login_engine/stylesheets/login_engine.css Am I supposed to create a folder called engine_files and manually copy over the css files? I would imagine the engine_stylesheets helper would just grab the stylesheet from the plugins folder. Or is it the case where I have to set the ''public_dir'' value somewhere in my enviroment.rb ? On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m having trouble getting the login_engine stylesheet to load in my > application.rhtml layout file. I have the following line added to the head > of my document: > > <%= engine_stylesheet ''login_engine'' %> > > Am I missing something? > > Another unrelated question.. I used the Rails plugin install method to > install both the Engines plugin as well as the login_engine. Is there a > better way to do this using SVN, so that I can always be up to date (kinda > like how I have using SVN external to get Edge Rails)? And will the Rails > pluing installer always grab the latest version if you run it again? > > Thank you! > > On 11/2/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi Edgardo - > > > > It behaves the same way as the Salted Hash Login Generator (since > > it''s essentially the same code :)), so yes - if, for instance, you > > tried to go to http://yoursite/user/edit without being logged in, you > > will be sent to http://yoursite/user/login > > > > You can change which actions are accessible without logging in as > > described in the README in the docs ( http://rails- > > engines.rubyforge.org/rdoc/login_engine)<http://engines.rubyforge.org/rdoc/login_engine%29> > > . > > > > Hope this helps! > > > > On 2 Nov 2005, at 20:27, Edgardo Hames wrote: > > > > > Great Job! I have just watched the video and it seems very powerful > > > and useful. > > > What happens if the user just types the path to a certain part of the > > > application? Does it automatically forward him to the login page? > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > - Ramin > http://www.getintothis.com/blog >-- - Ramin http://www.getintothis.com/blog _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
ok ok ok .. im getting a better understanding of all of this.. I just noticed the engine_files folder that was created in my public folder. I read the README file in there and understand how it works now. Problem now is, there is a folder called "login", but shouldn''t this be called "login_engine"? Either way, I tried renaming the folder to login_engine and I still can''t get the css to load. The <style> tag isn''t even being created in my view. Is this a feature of the engine_stylesheet or stylesheet_tag method that if it can''t find a stylesheet file it won''t even create the html for it? code of my view: <html> <head> <title>beta.yaram.com <http://beta.yaram.com></title> <%= engine_stylesheet ''login_engine'' # I also tried just ''login'' %> </head> <body> <%= @content_for_layout %> </body> </html> On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I printed out some debugging infromation to try and figure out why the > stylesheet wasn''t being included. It seems like the stylesheets are expected > to be in the following location: > > /public/engine_files/login_engine/stylesheets/login_engine.css > > Am I supposed to create a folder called engine_files and manually copy > over the css files? I would imagine the engine_stylesheets helper would just > grab the stylesheet from the plugins folder. Or is it the case where I have > to set the ''public_dir'' value somewhere in my enviroment.rb ? > > > On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > I''m having trouble getting the login_engine stylesheet to load in my > > application.rhtml layout file. I have the following line added to the > > head of my document: > > > > <%= engine_stylesheet ''login_engine'' %> > > > > Am I missing something? > > > > Another unrelated question.. I used the Rails plugin install method to > > install both the Engines plugin as well as the login_engine. Is there a > > better way to do this using SVN, so that I can always be up to date (kinda > > like how I have using SVN external to get Edge Rails)? And will the Rails > > pluing installer always grab the latest version if you run it again? > > > > Thank you! > > > > On 11/2/05, James Adam < james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hi Edgardo - > > > > > > It behaves the same way as the Salted Hash Login Generator (since > > > it''s essentially the same code :)), so yes - if, for instance, you > > > tried to go to http://yoursite/user/edit without being logged in, you > > > will be sent to http://yoursite/user/login > > > > > > You can change which actions are accessible without logging in as > > > described in the README in the docs ( http://rails- > > > engines.rubyforge.org/rdoc/login_engine)<http://engines.rubyforge.org/rdoc/login_engine%29> > > > . > > > > > > Hope this helps! > > > > > > On 2 Nov 2005, at 20:27, Edgardo Hames wrote: > > > > > > > Great Job! I have just watched the video and it seems very powerful > > > > and useful. > > > > What happens if the user just types the path to a certain part of > > > the > > > > application? Does it automatically forward him to the login page? > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > -- > > - Ramin > > http://www.getintothis.com/blog > > > > > > -- > - Ramin > http://www.getintothis.com/blog >-- - Ramin http://www.getintothis.com/blog _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''m really sorry about these emails.. but I''m hoping it''ll help others who are having the same problems as I am. I found out the problem. In the documentation, it says to start the engine by simple calling: Engines.start :login in your environment.rb.. this in turn will cause the folder that is created in the public/engine_files to be called "login", instead of "login_engine". Problem is the engine_stylesheet method is looking for a folder called login_engine and not just login. All I did was change that line in my environment.rb file to read: Engines.start :login_engine and it seems to have solved the problem. The css file loads properly. Again, sorry about all the emails.. I just thought I''d share my findings with everyone. On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > ok ok ok .. im getting a better understanding of all of this.. I just > noticed the engine_files folder that was created in my public folder. I read > the README file in there and understand how it works now. Problem now is, > there is a folder called "login", but shouldn''t this be called > "login_engine"? > > Either way, I tried renaming the folder to login_engine and I still can''t > get the css to load. The <style> tag isn''t even being created in my view. Is > this a feature of the engine_stylesheet or stylesheet_tag method that if it > can''t find a stylesheet file it won''t even create the html for it? > > code of my view: > > <html> > <head> > <title>beta.yaram.com <http://beta.yaram.com></title> > <%= engine_stylesheet ''login_engine'' # I also tried just ''login'' %> > </head> > <body> > <%= @content_for_layout %> > </body> > </html> > > On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > I printed out some debugging infromation to try and figure out why the > > stylesheet wasn''t being included. It seems like the stylesheets are expected > > to be in the following location: > > > > /public/engine_files/login_engine/stylesheets/login_engine.css > > > > Am I supposed to create a folder called engine_files and manually copy > > over the css files? I would imagine the engine_stylesheets helper would just > > grab the stylesheet from the plugins folder. Or is it the case where I have > > to set the ''public_dir'' value somewhere in my enviroment.rb ? > > > > > > On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > > > I''m having trouble getting the login_engine stylesheet to load in my > > > application.rhtml layout file. I have the following line added to the > > > head of my document: > > > > > > <%= engine_stylesheet ''login_engine'' %> > > > > > > Am I missing something? > > > > > > Another unrelated question.. I used the Rails plugin install method to > > > install both the Engines plugin as well as the login_engine. Is there a > > > better way to do this using SVN, so that I can always be up to date (kinda > > > like how I have using SVN external to get Edge Rails)? And will the Rails > > > pluing installer always grab the latest version if you run it again? > > > > > > Thank you! > > > > > > On 11/2/05, James Adam < james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Hi Edgardo - > > > > > > > > It behaves the same way as the Salted Hash Login Generator (since > > > > it''s essentially the same code :)), so yes - if, for instance, you > > > > tried to go to http://yoursite/user/edit without being logged in, > > > > you > > > > will be sent to http://yoursite/user/login > > > > > > > > You can change which actions are accessible without logging in as > > > > described in the README in the docs ( http://rails- > > > > engines.rubyforge.org/rdoc/login_engine)<http://engines.rubyforge.org/rdoc/login_engine%29> > > > > . > > > > > > > > Hope this helps! > > > > > > > > On 2 Nov 2005, at 20:27, Edgardo Hames wrote: > > > > > > > > > Great Job! I have just watched the video and it seems very > > > > powerful > > > > > and useful. > > > > > What happens if the user just types the path to a certain part of > > > > the > > > > > application? Does it automatically forward him to the login page? > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > -- > > > - Ramin > > > http://www.getintothis.com/blog > > > > > > > > > > > -- > > - Ramin > > http://www.getintothis.com/blog > > > > > > -- > - Ramin > http://www.getintothis.com/blog >-- - Ramin http://www.getintothis.com/blog _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
No problems - thanks for letting me know! There were always going to be a few teething problems - I''ve just found a nasty one with ActionMailer that I''m working on right now :-( - but we''ll iron them all out in no time :) Thanks for tracking this one down, I should have a fix in the SVN tonight - james On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m really sorry about these emails.. but I''m hoping it''ll help others who > are having the same problems as I am. > > I found out the problem. In the documentation, it says to start the engine > by simple calling: > > Engines.start :login > > in your environment.rb.. this in turn will cause the folder that is created > in the public/engine_files to be called "login", instead of "login_engine". > Problem is the engine_stylesheet method is looking for a folder called > login_engine and not just login. > > All I did was change that line in my environment.rb file to read: > > Engines.start :login_engine > > and it seems to have solved the problem. The css file loads properly. > Again, sorry about all the emails.. I just thought I''d share my findings > with everyone. > > > > On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > ok ok ok .. im getting a better understanding of all of this.. I just > noticed the engine_files folder that was created in my public folder. I read > the README file in there and understand how it works now. Problem now is, > there is a folder called "login", but shouldn''t this be called > "login_engine"? > > > > Either way, I tried renaming the folder to login_engine and I still can''t > get the css to load. The <style> tag isn''t even being created in my view. Is > this a feature of the engine_stylesheet or stylesheet_tag method that if it > can''t find a stylesheet file it won''t even create the html for it? > > > > code of my view: > > > > <html> > > <head> > > <title>beta.yaram.com</title> > > <%= engine_stylesheet ''login_engine'' # I also tried just ''login'' %> > > </head> > > <body> > > <%= @content_for_layout %> > > > </body> > > </html> > > > > > > > > On 11/2/05, Ramin < i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > I printed out some debugging infromation to try and figure out why the > stylesheet wasn''t being included. It seems like the stylesheets are expected > to be in the following location: > > > > > > > > > > /public/engine_files/login_engine/stylesheets/login_engine.css > > > > > > > > > Am I supposed to create a folder called engine_files and manually copy > over the css files? I would imagine the engine_stylesheets helper would just > grab the stylesheet from the plugins folder. Or is it the case where I have > to set the ''public_dir'' value somewhere in my enviroment.rb ? > > > > > > > > > > > > > > > On 11/2/05, Ramin <i8ramin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > I''m having trouble getting the login_engine stylesheet to load in my > application.rhtml layout file. I have the following line added to the head > of my document: > > > > > > > > <%= engine_stylesheet ''login_engine'' %> > > > > > > > > Am I missing something? > > > > > > > > Another unrelated question.. I used the Rails plugin install method to > install both the Engines plugin as well as the login_engine. Is there a > better way to do this using SVN, so that I can always be up to date (kinda > like how I have using SVN external to get Edge Rails)? And will the Rails > pluing installer always grab the latest version if you run it again? > > > > > > > > Thank you! > > > > > > > > > > > > > > > > On 11/2/05, James Adam < james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi Edgardo - > > > > > > > > > > It behaves the same way as the Salted Hash Login Generator (since > > > > > it''s essentially the same code :)), so yes - if, for instance, you > > > > > tried to go to http://yoursite/user/edit without being logged in, > you > > > > > will be sent to http://yoursite/user/login > > > > > > > > > > You can change which actions are accessible without logging in as > > > > > described in the README in the docs ( http://rails- > > > > > engines.rubyforge.org/rdoc/login_engine). > > > > > > > > > > Hope this helps! > > > > > > > > > > On 2 Nov 2005, at 20:27, Edgardo Hames wrote: > > > > > > > > > > > Great Job! I have just watched the video and it seems very > powerful > > > > > > and useful. > > > > > > What happens if the user just types the path to a certain part of > the > > > > > > application? Does it automatically forward him to the login page? > > > > > > > > > > _______________________________________________ > > > > > Rails mailing list > > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > - Ramin > > > > http://www.getintothis.com/blog > > > > > > > > > > > > -- > > > - Ramin > > > http://www.getintothis.com/blog > > > > > > > > -- > > - Ramin > > http://www.getintothis.com/blog > > > > -- > - Ramin > http://www.getintothis.com/blog > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Bruno, I have the same problem. Did you figure it out? -lv Bruno Celeste wrote:> Ok James, thank you. > > I am currently testing your engine and I get an issue starting webrick.. > I wrote my own engine, the simpliest in fact, just one controller with > an index method > > def index > render :text => "ok",:layout => false > end > > My controller''s name is Annu and the dir plugin is annu_engine. In my > environment.rb, I put: > Engines.start ''annu_engine'' > > The engine is loaded succesfully, in log file, I have: > > Starting engine ''annu_engine'' from > ''/home/sadik/ruby/rails/engine/vendor/plugins/annu_engine'' > adding /home/sadik/ruby/rails/engine/lib to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/helpers > to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/models > to the load path > adding /home/sadik/ruby/rails/engine/vendor/plugins/annu_engine/app/controllers > to the load path > > But webrick doesn''t say anything, I launch it and it exits without > spit a piece of word :/ Clearly, the server doesn''t start, nothing > appear in the log file, so maybe you know what appened. > > Thank you
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:> Bruno, > > I have the same problem. > Did you figure it out?
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 Bruno Celeste wrote:> 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: > >>Bruno, >> >>I have the same problem. >>Did you figure it out?
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 On 11/7/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote:> 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 > > > Bruno Celeste wrote: > > 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: > > > >>Bruno, > >> > >>I have the same problem. > >>Did you figure it out? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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
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
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
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:> 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 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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 On 11/8/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote:> 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 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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:> 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
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 James Adam wrote:> 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 > > On 11/8/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote: > >>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 >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > >>
It''s because of the way plugins are loaded - all errors get swallowed up. You should still see information in the log files though. On 11/8/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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: > > 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 > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
That''s fixed now Lou - just update your files from SVN. On 11/8/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote:> 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 > > > James Adam wrote: > > > 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 > > > > On 11/8/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote: > > > >>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 > >> > >>_______________________________________________ > >>Rails mailing list > >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > > > >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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. James Adam wrote:> It''s because of the way plugins are loaded - all errors get swallowed > up. You should still see information in the log files though. > > > On 11/8/05, Bruno Celeste <bruno.celeste-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>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: >>
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 James Adam wrote:> That''s fixed now Lou - just update your files from SVN. > > > On 11/8/05, Lou Vanek <vanek-9H8CmIPm+GA@public.gmane.org> wrote: > >>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 >> >> >>James Adam wrote: >> >> >>>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
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
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 On 11/8/05, James Adam <james.adam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 >
> Seriously. Between basic plugins and full-fledged engines, we''ve got > all the modularity we need... now if we could get some agreement in > APIs > between ActiveRBAC and ModelSecurity... :)Yo, a bit late, sorry, been busy: ModelSecurity: we want it. I tried to talk to bruce perens, he wasn''t rude but he didn''t open right up, either - so I think we''ll end up taking the ModelSecurity ideas & code and running with it. Bruce - correct me if I''m wrong, hey, hopefully so. I''m just catching up on the whole engines mushroom cloud, and dhur, sorry, what do people not LOVE about this idea? It was nearly the entire point of binarycloud, so it''s exactly what I''m looking for. I read this: http://weblog.rubyonrails.com/articles/2005/11/11/why-engines-and- components-are-not-evil-but-distracting And I think it''s extremely polite and nice and the point of view of a man building applications for a products company, not a client services company :) Also - if you have an idea for a web app, say a newfangled social-pizza-ordering app with lots of AJAX - your ''core idea'' rarely includes an authentication and authorization system, credit card processing layer, and all the other mundane crap you need to build it right™. What you need to support those core ideas are "best practices" components that you know to be tried and true, that have views, and in some cases even have their own CSS and images. ActiveRBAC, for example. (yay!) https://activerbac.turingstudio.com Standard Payment tools (Tobias pretty much has this) Embeddable Typo! Embeddable Forums! Embeddable Gallery! etc... everyone that is currently putting out full-rails-apps might be able to make them accessible in a way that they can be used everywhere for all kinds of projects. Fantastic! So! ENGINES RULE! I will be reading more, and saying more. Also, a big public thanks to Tobias (you rule): he is helping very much with our efforts to expand ActiveMerchant with support for TrustCommerce, who is sponsoring our development (which will be released MIT), free for all... If you need a good US credit card processor and would like to use ActiveMerchant + TrustCommerce, let me know... and if you call TrustCommerce about this be nice and tell them I sent you - I don''t work for them, I just like them, and I HATE verisign, those evil bastards. nite, _alex -- alex black, founder the turing studio, inc. 510.666.0074 root-16h2cdTTKgpzNNFeSAH1EA@public.gmane.org http://www.turingstudio.com 2600 10th street, suite 635 berkeley, ca 94710