From ed.howland at gmail.com Mon Apr 2 11:18:38 2007 From: ed.howland at gmail.com (Ed Howland) Date: Mon, 2 Apr 2007 10:18:38 -0500 Subject: [Masterview-users] Bug in mv:stylesheet_link In-Reply-To: <19cda190703261214o6d37b311le4e4f8f369d23c93@mail.gmail.com> References: <000f01c76d9a$9a1950d0$06001fac@homedesktop> <19cda190703261214o6d37b311le4e4f8f369d23c93@mail.gmail.com> Message-ID: <3df642dd0704020818w7aaf93a6v38c8d25cd7c88126@mail.gmail.com> On 3/26/07, Jeff Barczewski wrote: > > I will plan to do a gem build and formal release sometime later this week. Jeff, How is the gem build coming? Ed > > Jeff > > _______________________________________________ -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Mon Apr 2 11:25:30 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 2 Apr 2007 10:25:30 -0500 Subject: [Masterview-users] Bug in mv:stylesheet_link In-Reply-To: <3df642dd0704020818w7aaf93a6v38c8d25cd7c88126@mail.gmail.com> References: <000f01c76d9a$9a1950d0$06001fac@homedesktop> <19cda190703261214o6d37b311le4e4f8f369d23c93@mail.gmail.com> <3df642dd0704020818w7aaf93a6v38c8d25cd7c88126@mail.gmail.com> Message-ID: <19cda190704020825x2fbab255ib723d15140e67d79@mail.gmail.com> On 4/2/07, Ed Howland wrote: > > On 3/26/07, Jeff Barczewski wrote: > > > > I will plan to do a gem build and formal release sometime later this > week. > > Jeff, > > How is the gem build coming? > > Just need to track down the issue in the build not having the example authenticate file and I can do a build. I should be able to get it out today or tomorrow. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070402/4fc085fa/attachment.html From david at koontzfamily.org Mon Apr 2 16:37:17 2007 From: david at koontzfamily.org (David Koontz) Date: Mon, 02 Apr 2007 13:37:17 -0700 Subject: [Masterview-users] Failure to parse template Message-ID: <4611697D.9020207@koontzfamily.org> I have installed masterview into the vendor directory and when I start up mongrel I get: Initializing MasterView configuration (2007-04-02 13:18) Program name = script/server Using default admin_auth mixin for MasterView admin (local requests only) Adding MasterView AdminPages controller directories to controller_paths MasterView Admin pages enabled Failure to parse template. Exception=undefined method `progress' for # Failure to parse template. Exception=undefined method `progress' for # Failure to parse template. Exception=undefined method `progress' for # Failure to parse template. Exception=undefined method `progress' for # Failure to parse template. Exception=undefined method `progress' for # Failure to parse template. Exception=undefined method `progress' for # Adding hook to allow MasterView to check for templates that have changed when processing a request Adding hooks to enable Rails to read erb directly from MasterView MasterView plugin initialized - Version 0.3.2 ** Rails loaded. Followed by the rest of the normal rails startup output. When I try to hit http://localhost:3000/masterview or other url's that are masterview generated content I get the same error again Failure to parse template. Exception=undefined method `progress' for # Any idea on what I might have done wrong? I'm on Rails 1.2. David Koontz From jeff.barczewski at gmail.com Mon Apr 2 17:53:23 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 2 Apr 2007 16:53:23 -0500 Subject: [Masterview-users] Failure to parse template In-Reply-To: <4611697D.9020207@koontzfamily.org> References: <4611697D.9020207@koontzfamily.org> Message-ID: <19cda190704021453i512b9f58x33bc6537661a15c4@mail.gmail.com> On 4/2/07, David Koontz wrote: > > I have installed masterview into the vendor directory and when I start > up mongrel I get: > > Initializing MasterView configuration (2007-04-02 13:18) > Program name = script/server > Using default admin_auth mixin for MasterView admin (local requests only) > Adding MasterView AdminPages controller directories to controller_paths > MasterView Admin pages enabled > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Adding hook to allow MasterView to check for templates that have changed > when processing a request > Adding hooks to enable Rails to read erb directly from MasterView > MasterView plugin initialized - Version 0.3.2 > ** Rails loaded. > Followed by the rest of the normal rails startup output. > > When I try to hit http://localhost:3000/masterview or other url's that > are masterview generated content I get the same error again > > Failure to parse template. Exception=undefined method `progress' for > # > > Any idea on what I might have done wrong? I'm on Rails 1.2. > > I don't believe I have seen that error before, but I will take a look at the SAXParserListener code to see if I can determine what it is complaining about. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070402/db69102b/attachment.html From jeff.barczewski at gmail.com Mon Apr 2 18:35:43 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 2 Apr 2007 17:35:43 -0500 Subject: [Masterview-users] Failure to parse template In-Reply-To: <4611697D.9020207@koontzfamily.org> References: <4611697D.9020207@koontzfamily.org> Message-ID: <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> On 4/2/07, David Koontz wrote: > > I have installed masterview into the vendor directory and when I start > up mongrel I get: > > Initializing MasterView configuration (2007-04-02 13:18) > Program name = script/server > Using default admin_auth mixin for MasterView admin (local requests only) > Adding MasterView AdminPages controller directories to controller_paths > MasterView Admin pages enabled > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Adding hook to allow MasterView to check for templates that have changed > when processing a request > Adding hooks to enable Rails to read erb directly from MasterView > MasterView plugin initialized - Version 0.3.2 > ** Rails loaded. > Followed by the rest of the normal rails startup output. > > When I try to hit http://localhost:3000/masterview or other url's that > are masterview generated content I get the same error again > > Failure to parse template. Exception=undefined method `progress' for > # > > Any idea on what I might have done wrong? I'm on Rails 1.2. > I am guessing that possibly you may have REXML 3.1.6?? If you possibly have rexml 3.1.6 (I have only tested with up to 3.1.5) then maybe they have changed their interface some so they don't support the progress method. Rexml 3.1.5 was broken with regards to parsing doctypes, so I fixed it and submitted a patch to them, but since I wasn't sure when people would get the latest version and not sure what version the patch would go into (or when), I included a patched version of the parser which MasterView is using. It is possible that something in 3.1.6 changed the rexml interface such that this patched parser is now broken. (no longer supporting progress method). So what I need to do is to download 3.1.6 and see if I can reproduce the error. I can also verify whether they have applied the patch I submitted them and if so then my patched rexml would not be needed for 3.1.6+ I have to run now, but I will try to take a look tonight to see if that is the case. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070402/de78ff08/attachment.html From djlewis at acm.org Mon Apr 2 19:36:40 2007 From: djlewis at acm.org (Deb Lewis) Date: Mon, 2 Apr 2007 16:36:40 -0700 Subject: [Masterview-users] Failure to parse template In-Reply-To: <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> References: <4611697D.9020207@koontzfamily.org> <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> Message-ID: <002e01c7757f$c38e5590$6601a8c0@cx797990aDLI9> Jeff - quick note on related but diff problem: one of my pet peeves is that our logging message when a template doesn't parse correctly is thoroughly useful, in particular it doesn't identify the name/path of the html file which isn't valid html and causes our parser to barf. I'll get in and fix that in the next day or so, as soon as I have a chance (unless you run across that as side effect of looking into this nstall/version problem...). I think you haven't noticed that because you probably have tidy configured to preprocess your input templates (to clean up the bad markup you get from nvu?!), but I never run with that so anytime I mistype something masterview chokes in relatively mysterious ways. You can figure out during dev if you're only working on a specific .html file and testing some changes, but in general case this is really bad. ~ Deb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070402/6ec2889b/attachment.html From david at koontzfamily.org Mon Apr 2 20:40:52 2007 From: david at koontzfamily.org (David Koontz) Date: Mon, 02 Apr 2007 17:40:52 -0700 Subject: [Masterview-users] Failure to parse template In-Reply-To: <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> References: <4611697D.9020207@koontzfamily.org> <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> Message-ID: <4611A294.3020809@koontzfamily.org> REXML::Version gives 3.1.3 > On 4/2/07, *David Koontz* > wrote: > > I have installed masterview into the vendor directory and when I start > up mongrel I get: > > Initializing MasterView configuration (2007-04-02 13:18) > Program name = script/server > Using default admin_auth mixin for MasterView admin (local > requests only) > Adding MasterView AdminPages controller directories to > controller_paths > MasterView Admin pages enabled > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Failure to parse template. Exception=undefined method `progress' for > # > Adding hook to allow MasterView to check for templates that have > changed > when processing a request > Adding hooks to enable Rails to read erb directly from MasterView > MasterView plugin initialized - Version 0.3.2 > ** Rails loaded. > Followed by the rest of the normal rails startup output. > > When I try to hit http://localhost:3000/masterview > or other url's that > are masterview generated content I get the same error again > > Failure to parse template. Exception=undefined method `progress' for > # > > Any idea on what I might have done wrong? I'm on Rails 1.2. > > > > I am guessing that possibly you may have REXML 3.1.6?? > > If you possibly have rexml 3.1.6 (I have only tested with up to 3.1.5) > then maybe they have changed their interface some so they don't > support the progress method. Rexml 3.1.5 was broken with regards to > parsing doctypes, so I fixed it and submitted a patch to them, but > since I wasn't sure when people would get the latest version and not > sure what version the patch would go into (or when), I included a > patched version of the parser which MasterView is using. > > It is possible that something in 3.1.6 changed the rexml interface > such that this patched parser is now broken. (no longer supporting > progress method). > > So what I need to do is to download 3.1.6 and see if I can reproduce > the error. I can also verify whether they have applied the patch I > submitted them and if so then my patched rexml would not be needed for > 3.1.6+ > > I have to run now, but I will try to take a look tonight to see if > that is the case. > > Jeff > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users From jeff.barczewski at gmail.com Tue Apr 3 10:57:32 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 3 Apr 2007 09:57:32 -0500 Subject: [Masterview-users] Failure to parse template In-Reply-To: <4611A294.3020809@koontzfamily.org> References: <4611697D.9020207@koontzfamily.org> <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> <4611A294.3020809@koontzfamily.org> Message-ID: <19cda190704030757j711ccc4bqd07a3c797a7387f@mail.gmail.com> On 4/2/07, David Koontz wrote: > > REXML::Version gives 3.1.3 > > On 4/2/07, *David Koontz* > > wrote: > > > > I have installed masterview into the vendor directory and when I > start > > up mongrel I get: > > > > Initializing MasterView configuration (2007-04-02 13:18) > > Program name = script/server > > Using default admin_auth mixin for MasterView admin (local > > requests only) > > Adding MasterView AdminPages controller directories to > > controller_paths > > MasterView Admin pages enabled > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Adding hook to allow MasterView to check for templates that have > > changed > > when processing a request > > Adding hooks to enable Rails to read erb directly from MasterView > > MasterView plugin initialized - Version 0.3.2 > > ** Rails loaded. > > Followed by the rest of the normal rails startup output. > > > > When I try to hit http://localhost:3000/masterview > > or other url's that > > are masterview generated content I get the same error again > > > > Failure to parse template. Exception=undefined method `progress' for > > # > > > > Any idea on what I might have done wrong? I'm on Rails 1.2. > > > I believe I have found the issue. It is a result of the rexml version being older, the patched class uses an event progress which is not defined in 3.1.3. I am completing and testing a fix that checks the version of rexml before using the patched parser otherwise it will default to the original version (which might not handle doctypes properly but otherwise should work fine). Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070403/2dc4c1f2/attachment.html From jeff.barczewski at gmail.com Tue Apr 3 14:16:08 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 3 Apr 2007 13:16:08 -0500 Subject: [Masterview-users] Failure to parse template In-Reply-To: <4611A294.3020809@koontzfamily.org> References: <4611697D.9020207@koontzfamily.org> <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> <4611A294.3020809@koontzfamily.org> Message-ID: <19cda190704031116r3c4cbac9hb0ea38ba9f4e2760@mail.gmail.com> On 4/2/07, David Koontz wrote: > > REXML::Version gives 3.1.3 > > On 4/2/07, *David Koontz* > > wrote: > > > > I have installed masterview into the vendor directory and when I > start > > up mongrel I get: > > > > Initializing MasterView configuration (2007-04-02 13:18) > > Program name = script/server > > Using default admin_auth mixin for MasterView admin (local > > requests only) > > Adding MasterView AdminPages controller directories to > > controller_paths > > MasterView Admin pages enabled > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Failure to parse template. Exception=undefined method `progress' for > > # > > Adding hook to allow MasterView to check for templates that have > > changed > > when processing a request > > Adding hooks to enable Rails to read erb directly from MasterView > > MasterView plugin initialized - Version 0.3.2 > > ** Rails loaded. > > Followed by the rest of the normal rails startup output. > > > > When I try to hit http://localhost:3000/masterview > > or other url's that > > are masterview generated content I get the same error again > > > > Failure to parse template. Exception=undefined method `progress' for > > # > > > > Any idea on what I might have done wrong? I'm on Rails 1.2. > > > Well David, I have good news and bad news. The good news is that I have updated MasterView in the trunk with a version that checks the REXML version before attempting to use the patched sax2parser. The patched parser works with 3.1.4 - 3.1.6 versions of REXML. According to REXML trac, supposedly REXML 3.1.7 will have my doctype patch in the core, so it will not be needed after that anyway. I have also made this patched parser configurable with a new config option. If you set config.use_original_rexml_sax2parser = true, then it will not use the patch regardless of the version otherwise it will load and use the patch if REXML 3.1.4 - 3.1.6. I have tested MasterView with all of these versions 3.1.4, 3.1.5, 3.1.6 (current). The bad news is that REXML 3.1.3 seems to have a broken sax2parser such that I get errors when trying to simply require it despite the fact that we aren't loading the rexml patch. So it appears that MasterView won't work with REXML 3.1.3. I put in a check for this now in startup and it throws an exception if one tries to use a version less than 3.1.4. 3.1.3 was released in 2004, so hopefully this will not be a problem for most people. I have checked all the code changes into svn in the trunk and will plan to do a gem build and release once Deb has had a chance to look at my changes. svn://rubyforge.org/var/svn/masterview/trunk/masterview I have updated the documentation to indicate that REXML version needs to be 3.1.4 or greater. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070403/ad7a8b18/attachment.html From david at koontzfamily.org Tue Apr 3 14:47:39 2007 From: david at koontzfamily.org (David Koontz) Date: Tue, 03 Apr 2007 11:47:39 -0700 Subject: [Masterview-users] Failure to parse template In-Reply-To: <19cda190704031116r3c4cbac9hb0ea38ba9f4e2760@mail.gmail.com> References: <4611697D.9020207@koontzfamily.org> <19cda190704021535p2a178ba5we10c96c2de481190@mail.gmail.com> <4611A294.3020809@koontzfamily.org> <19cda190704031116r3c4cbac9hb0ea38ba9f4e2760@mail.gmail.com> Message-ID: <4612A14B.8030703@koontzfamily.org> It's not an issue for me to upgrade, I was using the MacPorts version of Ruby and assumed it was updating the standard libraries when it updated Ruby to 1.8.6. David > On 4/2/07, *David Koontz* > wrote: > > REXML::Version gives 3.1.3 > > On 4/2/07, *David Koontz* > > >> > wrote: > > > > I have installed masterview into the vendor directory and > when I start > > up mongrel I get: > > > > Initializing MasterView configuration (2007-04-02 13:18) > > Program name = script/server > > Using default admin_auth mixin for MasterView admin (local > > requests only) > > Adding MasterView AdminPages controller directories to > > controller_paths > > MasterView Admin pages enabled > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Failure to parse template. Exception=undefined method > `progress' for > > # > > Adding hook to allow MasterView to check for templates that have > > changed > > when processing a request > > Adding hooks to enable Rails to read erb directly from > MasterView > > MasterView plugin initialized - Version 0.3.2 > > ** Rails loaded. > > Followed by the rest of the normal rails startup output. > > > > When I try to hit http://localhost:3000/masterview > > or other url's that > > are masterview generated content I get the same error again > > > > Failure to parse template. Exception=undefined method > `progress' for > > # > > > > Any idea on what I might have done wrong? I'm on Rails 1.2. > > > > > > Well David, I have good news and bad news. The good news is that I > have updated MasterView in the trunk with a version that checks the > REXML version before attempting to use the patched sax2parser. The > patched parser works with 3.1.4 - 3.1.6 versions of REXML. According > to REXML trac, supposedly REXML 3.1.7 will have my doctype patch in > the core, so it will not be needed after that anyway. I have also made > this patched parser configurable with a new config option. If you set > config.use_original_rexml_sax2parser = true, then it will not use the > patch regardless of the version otherwise it will load and use the > patch if REXML 3.1.4 - 3.1.6. I have tested MasterView with all of > these versions 3.1.4 , 3.1.5, 3.1.6 (current). > > The bad news is that REXML 3.1.3 seems to have a broken sax2parser > such that I get errors when trying to simply require it despite the > fact that we aren't loading the rexml patch. So it appears that > MasterView won't work with REXML 3.1.3. I put in a check for this now > in startup and it throws an exception if one tries to use a version > less than 3.1.4. 3.1.3 was released in 2004, so hopefully this will > not be a problem for most people. > > I have checked all the code changes into svn in the trunk and will > plan to do a gem build and release once Deb has had a chance to look > at my changes. > > svn://rubyforge.org/var/svn/masterview/trunk/masterview > > I have updated the documentation to indicate that REXML version needs > to be 3.1.4 or greater. > > Jeff > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users From david at koontzfamily.org Tue Apr 3 20:58:04 2007 From: david at koontzfamily.org (David Koontz) Date: Tue, 03 Apr 2007 17:58:04 -0700 Subject: [Masterview-users] View structure Message-ID: <4612F81C.9000602@koontzfamily.org> First off, I think masterview is wickedly awesome. I'm converted both of my current projects over to it. Thank you Jeff for your presentation at MountainWest Ruby Conf. I don't know why more buzz isn't being generated about masterview, I seem to be the only one here in Phoenix really excited about it (that I know of). So with that said, I had a question on how people generally structure their view directory. I ask this because of a couple of problems I've run into. Here's the situation. I have the xhtml given to me by our designer. It of course does not follow rails conventions, doesn't have a public directory where the images and css goes, etc. Just to test masterview and get it started I dropped the xhtml structure into views and started adding directives. The problems I can see with this are twofold. A) if I ever need to turn on rhtml rendering it will be a horrid mess, I would like to have a "generated" area that I can safely blow away when I'm done needing to generate the rhtml. B) The stylesheet and image references, to work in both html design mode and rails rendering mode would have to be located in public which means the designers either have to know how rails lays out its files or I have to go and convert everything afterwards, neither of which sounds appealing. So, my question is, can I have my html parked in a directory such as static and have masterview look there to get its source files from? Second, could that process include some sort of pre-processing where certain directories are copied to their "real" home, say /static/images goes to /public/images and /static/final/css goes to /public/stylesheets. You get the idea. I would be happy to help with any of these changes as I think they would allow a nice separation between design and development worlds. If I'm insane feel free to point that out as well. David Koontz From hyoshiok at computer.org Wed Apr 4 00:03:54 2007 From: hyoshiok at computer.org (Hiroki Yoshioka) Date: Wed, 4 Apr 2007 13:03:54 +0900 Subject: [Masterview-users] View structure In-Reply-To: <4612F81C.9000602@koontzfamily.org> References: <4612F81C.9000602@koontzfamily.org> Message-ID: <5d987c330704032103l3ae553b1ld15a59eecd4987c7@mail.gmail.com> Hi David, I'm not very experienced in this nice template plugin, but I think I have a answer for your question B. > B) The > stylesheet and image references, to work in both html design mode and > rails rendering mode would have to be located in public which means the > designers either have to know how rails lays out its files or I have to > go and convert everything afterwards, neither of which sounds > appealing. So, my question is, can I have my html parked in a directory > such as static and have masterview look there to get its source files > from? Second, could that process include some sort of pre-processing > where certain directories are copied to their "real" home, say > /static/images goes to /public/images and /static/final/css goes to > /public/stylesheets. to short, have another document root for your templates. here's some hints. our project has the same directory structure as MasterView has in default, that is: RAILS_ROOT - public - stylesheets - images - app - views - controller - view.html you don't need to touch anything of them. but you just set up RAILS_ROOT/app/views as a different document root or an alias from that of RAILS_ROOT/public. we're using apache and our setup looks as following: Options ExecCGI FollowSymLinks RewriteEngine On RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] Alias /project/ "/rails/root/public/" Alias /project "/rails/root/public/" Alias /project-templates/ "/rails/root/app/views/" so when you open your.domain/project/controller/view on your browser, you get rendered version and your.domain/project-templates/controller/view.html sends you the template. apache may not be very popular in rails world but you get some sense from it. the example above is configured with Location and Alias, but I'm sure that you can make a similar setting with virtual hosts. (change your domains instead.) hope this helps, hiro From jeff.barczewski at gmail.com Wed Apr 4 12:13:11 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Wed, 4 Apr 2007 11:13:11 -0500 Subject: [Masterview-users] View structure In-Reply-To: <4612F81C.9000602@koontzfamily.org> References: <4612F81C.9000602@koontzfamily.org> Message-ID: <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> On 4/3/07, David Koontz wrote: > > First off, I think masterview is wickedly awesome. I'm converted both > of my current projects over to it. Thank you Jeff for your presentation > at MountainWest Ruby Conf. I don't know why more buzz isn't being > generated about masterview, I seem to be the only one here in Phoenix > really excited about it (that I know of). Thanks for the kind words David. I think it's just a new way of doing things and it takes time to get some traction (chicken and egg problem to some extent). There are a large number of Rails users who just won't go off of the pure Rails track either, even though they should since more and more things are going to be made available via plugins going forward. Thanks for taking the time to write up your ideas, its these things that will propell MasterView forward and improve some of the difficult areas. My problem is that it is hard for me to know what the difficult areas are for people, so I am thankful for you to take the time to write this up. So with that said, I had a question on how people generally structure > their view directory. I ask this because of a couple of problems I've > run into. Here's the situation. I have the xhtml given to me by our > designer. It of course does not follow rails conventions, doesn't have > a public directory where the images and css goes, etc. Just to test > masterview and get it started I dropped the xhtml structure into views > and started adding directives. The problems I can see with this are > twofold. A) if I ever need to turn on rhtml rendering it will be a > horrid mess, I would like to have a "generated" area that I can safely > blow away when I'm done needing to generate the rhtml. I agree. We need an easy way to allow users to generate the rhtml to a new safe area other than the main project. I think this might best be served by using a rake command. We already have one that invokes the generator, but in addition it should take an argument about where to generate the rhtml. This would allow you to generate the rhtml to a specified location without having to touch your config and not pollute the main directory. I think this will be an easy change. Would this meet your needs? Alternatively one could have a different directory where all the MasterView source templates are stored (other than the normal location in app/views) and then we generate the rhtml into the normal app/views location. This could be accomplished by changing the config of where MasterView reads its files from, but a disadvantage is that new developers on the project would instinctively go to app/views and find the generated rhtml where they would edit things only to have it overwritten later. So this is an option too, but I think the enhancement to the rake command is a little better and safer. B) The > stylesheet and image references, to work in both html design mode and > rails rendering mode would have to be located in public which means the > designers either have to know how rails lays out its files or I have to > go and convert everything afterwards, neither of which sounds > appealing. So, my question is, can I have my html parked in a directory > such as static and have masterview look there to get its source files > from? Yes, we can change the directory of where MasterView reads from using the config.template_src_dir_path = 'yourstatic/masterview/dir' Second, could that process include some sort of pre-processing > where certain directories are copied to their "real" home, say > /static/images goes to /public/images and /static/final/css goes to > /public/stylesheets. You get the idea. I would be happy to help with > any of these changes as I think they would allow a nice separation > between design and development worlds. If I'm insane feel free to point > that out as well. I like those ideas as well. That makes it much easier to start from an existing prototype without having to manually move things into the right places. Let the application do it for you. Great idea! One question, what should be the mechanism to configure this? Should one add these paths to the config settings or is there a better way? I don't know if we should just automatically look for files based on extensions?? Any ideas along these lines? I will add both (rake generate enhancement and auto copy assets) of these onto my TODO list. Thanks for the input and ideas! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070404/49f12fe7/attachment.html From david at koontzfamily.org Wed Apr 4 17:57:35 2007 From: david at koontzfamily.org (David Koontz) Date: Wed, 04 Apr 2007 14:57:35 -0700 Subject: [Masterview-users] View structure In-Reply-To: <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> References: <4612F81C.9000602@koontzfamily.org> <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> Message-ID: <46141F4F.5080903@koontzfamily.org> > > > So with that said, I had a question on how people generally structure > their view directory. I ask this because of a couple of problems > I've > run into. Here's the situation. I have the xhtml given to me by our > designer. It of course does not follow rails conventions, doesn't > have > a public directory where the images and css goes, etc. Just to test > masterview and get it started I dropped the xhtml structure into views > and started adding directives. The problems I can see with this are > twofold. > > > > A) if I ever need to turn on rhtml rendering it will be a > horrid mess, I would like to have a "generated" area that I can safely > blow away when I'm done needing to generate the rhtml. > > > > I agree. We need an easy way to allow users to generate the rhtml to a > new safe area other than the main project. I think this might best be > served by using a rake command. We already have one that invokes the > generator, but in addition it should take an argument about where to > generate the rhtml. This would allow you to generate the rhtml to a > specified location without having to touch your config and not pollute > the main directory. > > I think this will be an easy change. Would this meet your needs? Well, after being alerted to config.template_src_dir_path a large chunk of my concerns are mitigated. However if you did want to still enhance the rakefile to specify the location of the generated rhtml why keep the location of the generated files out of the config file? From my perspective, that info needs to be recorded so someone new can just be told, "run rake generate_rhtml" or whatever the command will be and bam, it's done. If *I* have to type in a directory path each time it's a guarantee I will mistype it once and get a bunch of rhtml files in the wrong directory. > > Alternatively one could have a different directory where all the > MasterView source templates are stored (other than the normal location > in app/views) and then we generate the rhtml into the normal app/views > location. This could be accomplished by changing the config of where > MasterView reads its files from, but a disadvantage is that new > developers on the project would instinctively go to app/views and find > the generated rhtml where they would edit things only to have it > overwritten later. So this is an option too, but I think the > enhancement to the rake command is a little better and safer. I think just having config.template_src_dir_path is good for externalizing your html files and then you can use the rake task to generate the rhtml if you need to debug. One point on not confusing devs though, if you do have files in app/views and aren't using config.template_src_dir_path to make that directory external the devs are going to have to know what masterview is doing to make any sense of why there aren't standard index.rhtml, edit.rhtml, etc. files. So I think spending effort to not confuse devs is not really going to pay you back as you can't go very far without understanding what masterview is doing unless you have some other task to update your rhtml files whenever the html changes and the devs never edit the rhtml directly, not likely I think. > > > B) The > stylesheet and image references, to work in both html design mode and > rails rendering mode would have to be located in public which > means the > designers either have to know how rails lays out its files or I > have to > go and convert everything afterwards, neither of which sounds > appealing. So, my question is, can I have my html parked in a > directory > such as static and have masterview look there to get its source files > from? > > > > Yes, we can change the directory of where MasterView reads from using > the config.template_src_dir_path = 'yourstatic/masterview/dir' > I really should have read the config docs before posting, most of my issues were solved by that one line. > > Second, could that process include some sort of pre-processing > where certain directories are copied to their "real" home, say > /static/images goes to /public/images and /static/final/css goes to > /public/stylesheets. You get the idea. I would be happy to help with > any of these changes as I think they would allow a nice separation > between design and development worlds. If I'm insane feel free to > point > that out as well. > > > > I like those ideas as well. That makes it much easier to start from an > existing prototype without having to manually move things into the > right places. Let the application do it for you. Great idea! One > question, what should be the mechanism to configure this? Should one > add these paths to the config settings or is there a better way? I > don't know if we should just automatically look for files based on > extensions?? Any ideas along these lines? > I like having everything in the config file, that way when you check out the project from source control it's ready to rock. I would suggest 3 new lines in the config file, all having the same format: config.image_directory = ['app/html/images', 'public/images', ['gif', 'jpg', 'png']] # relative path from config.root_path from directory to directory file extensions Of course parameter #2 and #3 would be optional and default to /public/whatever with the appropriate file extension(s). This would allow various configurations, like your javascript in the main html dir mixed in with the html. config.javascript_directory = ['app/html', 'public/javascript', ['js']] # javascript mixed in with regular html or maybe config.javascript_directory = ['app/html', nil, ['js']] # javascript mixed in with regular html, nil perhaps indicates "default"? config.stylesheet_directory = ['app/html/css'] # stylesheets going to default /public/stylesheets, no need to specify any other options Also, in keeping with the whole, edit => view changes nature of rails, it would be great if masterview could detect changes in these files and do the auto-copy when you request a page. It's like above, if I have to run a rake task each time, well that would get tedious very fast. Perhaps a config setting to auto-copy files vs waiting for the rake task? > I will add both (rake generate enhancement and auto copy assets) of > these onto my TODO list. > > Thanks for the input and ideas! > > Jeff Any place I can help out? David Koontz From david at koontzfamily.org Wed Apr 4 21:02:59 2007 From: david at koontzfamily.org (David Koontz) Date: Wed, 04 Apr 2007 18:02:59 -0700 Subject: [Masterview-users] Creating a layouts/application.rhtml file Message-ID: <46144AC3.3050607@koontzfamily.org> So I'm trying to use our main page to generate a site-wide layouts/application.rhtml file. The problem is, the main html starts with: <div mv:replace="@title">Paybuyer Home</div> I initially put mv:generate="layouts/application.rhtml" at the end of the tag but that was not being seen as a generation directive (eg not showing up in the /masterview list of generated files and rake mv:view_rhtml failing). I tried putting
with the closing div around the whole page, but now I get a parse error: ERROR MasterView: Failure to parse template. Exception=Declarations can only occur in the doctype declaration. Line: Position: Last 80 unconsumed characters: References: <4612F81C.9000602@koontzfamily.org> Message-ID: <000c01c77740$fde712a0$6601a8c0@cx797990aDLI9> Here's another technique that can be used for structuring the rails view directory to deal with image and stylesheet refs so they work at design time. Won't necessarily be the right solution in all cases, but happens to work nicely for a site I'm working on currently and can be used to get rid of the need for an outside designer to have to deal with the rails app dir structure. Basic approach: create local dirs in or alongside your app/views for stylesheets and images referenced from template .html files. Lets you write nice relative path refs to these resources (vs the rather awful .././../public/foo) and gives you option to just package up the views dir to hand off to a designer without them having to deal with the containing rails app dir structure in their environment. e.g., I have app/views/xstyles and app/views/ximages dirs in my rails view dir so I can write templates as: On *nix, these resource dirs can be symlinked to your rails app's public dirs; on Windows or to decouple views from context dependency for design-time work, copy in some/all of the images you care about having rendered at design time and either copy stylesheets or create "relay" stylesheets in xstyles with the correct names but whose contents are obtained by using @import directive which references public/stylesheets. Note that having an "xstyles" dir for design-time refs can be also used to add/override styles that you might want only at design time, e.g., put special color on placeholder areas to remind yourself about something that gets filled in with real content by the runtime rendering. This approach works for styles as long as your pages are rendered using a rails layout which provides the real stylesheet refs in its header decl or if you use the MasterView config setting config.template_asset_base_ref_pattern[:stylesheets] with a suitable regexp to detect xstyles refs. The image refs will get mapped to your public resources at runtime if you set the MasterView config setting config.template_asset_base_ref_pattern[:images] with a regexp which matches your ximages references instead of/in addition the default regexp which detects public/images. Another approach to img ref mapping: install a custom masterview directive impl which is registered as a global directive to be applied to *all* tags in your templates and handles src ref transformations. This is actually what I do since I don't find the rails image helper fcn to be useful; my templates already have the necessary ref and my directive does some other mappings that I find useful on elements. (I can post that if people are interested, it's really easy to create this sort of directive now with the reworked directive infrastructure of the Nov. 0.3 release) ~ Deb From hyoshiok at computer.org Thu Apr 5 09:15:29 2007 From: hyoshiok at computer.org (Hiroki Yoshioka) Date: Thu, 5 Apr 2007 22:15:29 +0900 Subject: [Masterview-users] Creating a layouts/application.rhtml file In-Reply-To: <46144AC3.3050607@koontzfamily.org> References: <46144AC3.3050607@koontzfamily.org> Message-ID: <5d987c330704050615x6c0c7c64q10b36c0a4c250f55@mail.gmail.com> Hi, David, On 4/5/07, David Koontz wrote: > So I'm trying to use our main page to generate a site-wide > layouts/application.rhtml file. The problem is, the main html starts with: > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > <div mv:replace="@title">Paybuyer Home</div> > mv:stylesheet="" /> > > > > I initially put mv:generate="layouts/application.rhtml" at the end of > the tag but that was not being seen as a generation directive > (eg not showing up in the /masterview list of generated files and rake > mv:view_rhtml failing). actually you can just put the declaration in the beginning of the template, without any mv:-directive. then it magically appears on the rendered page. hiro From jeff.barczewski at gmail.com Thu Apr 5 11:55:25 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 5 Apr 2007 10:55:25 -0500 Subject: [Masterview-users] View structure In-Reply-To: <46141F4F.5080903@koontzfamily.org> References: <4612F81C.9000602@koontzfamily.org> <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> <46141F4F.5080903@koontzfamily.org> Message-ID: <19cda190704050855o14400258u1f7e220c5fd1a4cc@mail.gmail.com> On 4/4/07, David Koontz wrote: > > > > > > > A) if I ever need to turn on rhtml rendering it will be a > > horrid mess, I would like to have a "generated" area that I can > safely > > blow away when I'm done needing to generate the rhtml. > > > > > > > > I agree. We need an easy way to allow users to generate the rhtml to a > > new safe area other than the main project. I think this might best be > > served by using a rake command. We already have one that invokes the > > generator, but in addition it should take an argument about where to > > generate the rhtml. This would allow you to generate the rhtml to a > > specified location without having to touch your config and not pollute > > the main directory. > > > > I think this will be an easy change. Would this meet your needs? > > Well, after being alerted to config.template_src_dir_path a large chunk > of my concerns are mitigated. However if you did want to still enhance > the rakefile to specify the location of the generated rhtml why keep the > location of the generated files out of the config file? From my > perspective, that info needs to be recorded so someone new can just be > told, "run rake generate_rhtml" or whatever the command will be and bam, > it's done. If *I* have to type in a directory path each time it's a > guarantee I will mistype it once and get a bunch of rhtml files in the > wrong directory. Currently the rake generate_rhtml does use the config locations to determine where to read and write to. However if you don't have the configuration set to write rhtml to file system, running this invokes the parser and all, but you won't see any output unless the config had been set to write_rhtml (probably not what you want). So we probably need a way for one to point to a different destination IO object via an arg. This would allow you to setup additional destinations in the config and just point to one of them via rake based on an argument, and if you mistype the argument, you'll get an error indicating that the IO object was not found and possibly mistyped. It would make it easy to re-run. Command could be something lilke rake generate_rhtml DST_IO=foo and foo would be setup in the config as a MasterView IO destination (could be the file system somewhere, in the future it could be a database location). Another thought about rendering the rhtml and cleaning up focuses on the cleaning up aspect. If a person sets his config to render the rhtml to file system and then decides to go back to the other way, then how does one cleanup. One idea was to have a rake command that could cleanup the rendered rhtml files. It would walk through the rendering process to determine what files it generates and then clean those up on the file system (so any other rhtml files that exist but were not generated would not be removed, knowing that some people may have mixed environments with some MasterView some direct (legacy) rhtml). > > > Second, could that process include some sort of pre-processing > > where certain directories are copied to their "real" home, say > > /static/images goes to /public/images and /static/final/css goes to > > /public/stylesheets. You get the idea. I would be happy to help > with > > any of these changes as I think they would allow a nice separation > > between design and development worlds. If I'm insane feel free to > > point > > that out as well. > > > > > > > > I like those ideas as well. That makes it much easier to start from an > > existing prototype without having to manually move things into the > > right places. Let the application do it for you. Great idea! One > > question, what should be the mechanism to configure this? Should one > > add these paths to the config settings or is there a better way? I > > don't know if we should just automatically look for files based on > > extensions?? Any ideas along these lines? > > > I like having everything in the config file, that way when you check out > the project from source control it's ready to rock. I would suggest 3 > new lines in the config file, all having the same format: > > config.image_directory = ['app/html/images', 'public/images', ['gif', > 'jpg', 'png']] # relative path from config.root_path > from directory to > directory file extensions > > Of course parameter #2 and #3 would be optional and default to > /public/whatever with the appropriate file extension(s). This would > allow various configurations, like your javascript in the main html dir > mixed in with the html. > > config.javascript_directory = ['app/html', 'public/javascript', ['js']] > # javascript mixed in with regular html > > or maybe > > config.javascript_directory = ['app/html', nil, ['js']] # javascript > mixed in with regular html, nil perhaps indicates "default"? > > config.stylesheet_directory = ['app/html/css'] # stylesheets going to > default /public/stylesheets, no need to specify any other options Yeah, I see where you are going with this. We could also go with something like this config.auto_copy_files = { 'app/html/images' => 'public/images', # copies everything in images including directories, keeps same structure in public/images ['app/html/myscripts', ['js']] => public/javascript', # copies all *.js files and subdirectories, keeping same structure ['app/html/mycss', ['css', 'cs']] => public/stylesheets', # copies all *.css and *.cs files and subdirectories, keeping same structure } This gives us an open ended way to copy anything and also to merge from multiple locations. So in the future if someone needs to copy anything else, they can do it without needing a code change. I also like the hash arrow syntax for indicating where we are copying to (kind of a directional visual indicator to help jog the mind of the syntax). Also, in keeping with the whole, edit => view changes nature of rails, > it would be great if masterview could detect changes in these files and > do the auto-copy when you request a page. It's like above, if I have to > run a rake task each time, well that would get tedious very fast. > Perhaps a config setting to auto-copy files vs waiting for the rake task? Seems like it might be nice to monitor these static files the the same way we monitor for changes in MasterView templates. We process on startup and then if in development mode we would check for changes on each request using timestamp, auto copying over any changes. In production mode only copy on startup and skip the currency checks. > > Any place I can help out? We can certainly use help in any area you would want to tackle now or anytime. If you would like to work on any of these enhancements, just let me know which one(s) and I can point you into the right direction in the code and make sure we don't step on each other's toes. Our code is located at svn://rubyforge.org/projects/masterview/trunk/masterview (for the latest) Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070405/01b02b68/attachment.html From jeff.barczewski at gmail.com Thu Apr 5 11:58:38 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 5 Apr 2007 10:58:38 -0500 Subject: [Masterview-users] View structure In-Reply-To: <000c01c77740$fde712a0$6601a8c0@cx797990aDLI9> References: <4612F81C.9000602@koontzfamily.org> <000c01c77740$fde712a0$6601a8c0@cx797990aDLI9> Message-ID: <19cda190704050858l9e9bc31ha45c92567408220b@mail.gmail.com> On 4/5/07, Deb Lewis wrote: > > > Another approach to img ref mapping: install a custom masterview directive > impl which is registered as a global directive to be applied to *all* > > tags in your templates and handles src ref transformations. This is > actually what I do since I don't find the rails image helper fcn to be > useful; my templates already have the necessary ref and my directive does > some other mappings that I find useful on elements. > > (I can post that if people are interested, it's really easy to create this > sort of directive now with the reworked directive infrastructure of the > Nov. > 0.3 release) > > I think this would be a nice example to have in our examples folder, with some info in the comments about what is specifically does. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070405/484aca0a/attachment.html From jeff.barczewski at gmail.com Fri Apr 6 07:33:09 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 6 Apr 2007 06:33:09 -0500 Subject: [Masterview-users] View structure In-Reply-To: <19cda190704050855o14400258u1f7e220c5fd1a4cc@mail.gmail.com> References: <4612F81C.9000602@koontzfamily.org> <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> <46141F4F.5080903@koontzfamily.org> <19cda190704050855o14400258u1f7e220c5fd1a4cc@mail.gmail.com> Message-ID: <19cda190704060433t103087adrc2b3effe06a912e1@mail.gmail.com> On 4/5/07, Jeff Barczewski wrote: > > > config.auto_copy_files = { > 'app/html/images' => 'public/images', # copies everything in images > including directories, keeps same structure in public/images > ['app/html/myscripts', ['js']] => public/javascript', # copies all > *.js files and subdirectories, keeping same structure > ['app/html/mycss', ['css', 'cs']] => public/stylesheets', # copies > all *.css and *.cs files and subdirectories, keeping same structure > } > Or possibly this is clearer yet config.auto_copy_files << { :src => 'app/html/images', :exts => ['gif', 'jpg', 'png'], :dst => 'public/images' } # copy gif, jpg, png, keep subdir structure config.auto_copy_files << { :src => 'app/html/myscripts', :dst => 'public/javascript' } # copy all myscripts, keep subdir structure config.auto_copy_files << { :src => 'app/html/mycss', :dst => 'public/stylesheet' } # copy all mycss, keep subdir structure Thoughts? Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070406/97cc8711/attachment.html From jarod at attollo.net Fri Apr 6 11:04:16 2007 From: jarod at attollo.net (Jarod Reid) Date: Fri, 06 Apr 2007 09:04:16 -0600 Subject: [Masterview-users] Problems with Masterview Message-ID: <46166170.6070207@attollo.net> I have been trying out Masterview and have yet to get it to work. When I connect through the server (WEBRICK) after following the same steps for the demo I get... Missing template ./script/../config/../app/views/store/list.rhtml Any ideas? From jeff.barczewski at gmail.com Fri Apr 6 13:38:24 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 6 Apr 2007 12:38:24 -0500 Subject: [Masterview-users] Problems with Masterview In-Reply-To: <46166170.6070207@attollo.net> References: <46166170.6070207@attollo.net> Message-ID: <19cda190704061038s7b34f75ak8f47c09af0fdc002@mail.gmail.com> On 4/6/07, Jarod Reid wrote: > > I have been trying out Masterview and have yet to get it to work. When I > connect through the server (WEBRICK) after following the same steps for > the demo I get... > > Missing template ./script/../config/../app/views/store/list.rhtml > > Can you include the output from webrick when your system starts up? (the standard output that comes to the console when you launch). That might help us debug what is going on. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070406/0045d98b/attachment-0001.html From jarod at attollo.net Fri Apr 6 13:54:52 2007 From: jarod at attollo.net (Jarod Reid) Date: Fri, 06 Apr 2007 11:54:52 -0600 Subject: [Masterview-users] Problems with Masterview In-Reply-To: <19cda190704061038s7b34f75ak8f47c09af0fdc002@mail.gmail.com> References: <46166170.6070207@attollo.net> <19cda190704061038s7b34f75ak8f47c09af0fdc002@mail.gmail.com> Message-ID: <4616896C.1090403@attollo.net> Jeff Barczewski wrote: > On 4/6/07, *Jarod Reid* > > wrote: > > I have been trying out Masterview and have yet to get it to work. > When I > connect through the server (WEBRICK) after following the same > steps for > the demo I get... > > Missing template ./script/../config/../app/views/store/list.rhtml > > > > Can you include the output from webrick when your system starts up? > (the standard output that comes to the console when you launch). That > might help us debug what is going on. > > Thanks, > > Jeff > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users I figured it out. I am using RadRails for development. When the server is started in RadRails it shows: Program name = -e and the MasterView configuration terminates. RadRails does not correctly pass the program name. Is there possibly a way around this? From jeff.barczewski at gmail.com Fri Apr 6 14:17:24 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 6 Apr 2007 13:17:24 -0500 Subject: [Masterview-users] Problems with Masterview In-Reply-To: <4616896C.1090403@attollo.net> References: <46166170.6070207@attollo.net> <19cda190704061038s7b34f75ak8f47c09af0fdc002@mail.gmail.com> <4616896C.1090403@attollo.net> Message-ID: <19cda190704061117w8ff3324v2cbf5fc5d68bb5a6@mail.gmail.com> On 4/6/07, Jarod Reid wrote: > > Jeff Barczewski wrote: > > On 4/6/07, *Jarod Reid* > > > wrote: > > > > I have been trying out Masterview and have yet to get it to work. > > When I > > connect through the server (WEBRICK) after following the same > > steps for > > the demo I get... > > > > Missing template ./script/../config/../app/views/store/list.rhtml > > I figured it out. I am using RadRails for development. When the server > is started in RadRails it shows: > > Program name = -e > > and the MasterView configuration terminates. RadRails does not correctly > pass the program name. Is there possibly a way around this? > _______________________________________________ > Yes, Lea Viljanen found this issue not too long ago. According to Lea, the work around is to define a new set of web servers via the "External tools" mechanism instead of relying on the default generated web servers. I have it on my plate to see if I can come up with a better fix (one that will work out of the box with RadRails) as well. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070406/47ab78c6/attachment.html From david at koontzfamily.org Fri Apr 6 16:32:05 2007 From: david at koontzfamily.org (David Koontz) Date: Fri, 06 Apr 2007 13:32:05 -0700 Subject: [Masterview-users] View structure In-Reply-To: <19cda190704060433t103087adrc2b3effe06a912e1@mail.gmail.com> References: <4612F81C.9000602@koontzfamily.org> <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> <46141F4F.5080903@koontzfamily.org> <19cda190704050855o14400258u1f7e220c5fd1a4cc@mail.gmail.com> <19cda190704060433t103087adrc2b3effe06a912e1@mail.gmail.com> Message-ID: <4616AE45.2040606@koontzfamily.org> The hash is fine from my perspective but personally I prefer less abbreviated names, :source vs :src and especially :extensions or :types vs :exts. David Koontz > On 4/5/07, *Jeff Barczewski* > wrote: > > > config.auto_copy_files = { > 'app/html/images' => 'public/images', # copies everything in > images including directories, keeps same structure in public/images > ['app/html/myscripts', ['js']] => public/javascript', # > copies all *.js files and subdirectories, keeping same structure > ['app/html/mycss', ['css', 'cs']] => public/stylesheets', # > copies all *.css and *.cs files and subdirectories, keeping same > structure > } > > > > Or possibly this is clearer yet > > config.auto_copy_files << { :src => 'app/html/images', :exts => > ['gif', 'jpg', 'png'], :dst => 'public/images' } # copy gif, jpg, png, > keep subdir structure > config.auto_copy_files << { :src => 'app/html/myscripts', :dst => > 'public/javascript' } # copy all myscripts, keep subdir structure > config.auto_copy_files << { :src => 'app/html/mycss', :dst => > 'public/stylesheet' } # copy all mycss, keep subdir structure > > Thoughts? > > Jeff > > > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users From djlewis at acm.org Fri Apr 6 17:55:25 2007 From: djlewis at acm.org (Deb Lewis) Date: Fri, 6 Apr 2007 14:55:25 -0700 Subject: [Masterview-users] View structure In-Reply-To: <4616AE45.2040606@koontzfamily.org> References: <4612F81C.9000602@koontzfamily.org> <19cda190704040913q6c5e3621md0fa90bd09236695@mail.gmail.com> <46141F4F.5080903@koontzfamily.org> <19cda190704050855o14400258u1f7e220c5fd1a4cc@mail.gmail.com><19cda190704060433t103087adrc2b3effe06a912e1@mail.gmail.com> <4616AE45.2040606@koontzfamily.org> Message-ID: <004501c77896$48309740$6601a8c0@cx797990aDLI9> ditto [tho I don't mind :dest rather than :destination]. But I definitely lean towards clear names at the expense of a bit more verbosity vs. unix-ish crypticness like :src. IMO generally easier for people to work with libraries when there's a clear point of view on abbrevations [not], then they don't have to remember what this package's favorite variation of abbreviations are some set of termininology. Doesn't eliminate the need/importance of clear, consistent choice of names on the part of the developer, but makes it easier for clients I think. ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of David Koontz Sent: Friday, April 06, 2007 1:32 PM To: masterview-users at rubyforge.org Subject: Re: [Masterview-users] View structure The hash is fine from my perspective but personally I prefer less abbreviated names, :source vs :src and especially :extensions or :types vs :exts. David Koontz From jeff.barczewski at gmail.com Sat Apr 7 18:05:39 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 7 Apr 2007 17:05:39 -0500 Subject: [Masterview-users] Meant to have another maintenance release ready, but need to wait till end of next week Message-ID: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> I meant to have a maintenance release of MasterView done fixing some of the minor issues that were identified on the list over the last several weeks, however I got swamped at work and have not been able to get to wrapping it up. Deb is also working on some better error messages for when the templates don't parse, so that code should go in there as well. Tomorrow is Easter so I will be celebrating with my family and next week I am taking the family to Solitude, UT to try and get in some spring skiing (praying that they will have some decent snow, and a little powder would be nice). So since I don't know whether I will have internet connectivity there, I didn't want to rush out a release and possibly not be able to resolve issues while I am there. Plus since the criticality of these fixes is pretty low, I think we'd be better off waiting for a release late next week. I am back on Friday. In the meantime if anyone needs the latest code for whatever reason, all my fixes are checked in to the trunk if you want to pull the latest version that way svn://rubyforge.org/var/svn/masterview/trunk/masterview however normally I would suggest using the release version unless you have to get a fix or new feature. We go through additional testing and review before we push out each release. Deb will be applying her changes there to the trunk too as soon as they are ready. Late next week (when I am back) I will make the formal release moving the svn release tag and building the new gem. The trunk of the development (unreleased code) is at svn://rubyforge.org/var/svn/masterview/trunk/masterview The latest released code is always at svn://rubyforge.org/var/svn/masterview/tags/masterview and Rubyforge and its mirrors contains the latest release of the gem. When I get back I plan to get onto many of the suggestions you have had (better RadRails support out of the box, cleanup of generated rhtml, auto copy files, ...) as well as discussing some of the new power directives I have been working on. Have a happy Easter! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070407/1db31fa7/attachment.html From ed.howland at gmail.com Sun Apr 8 15:02:08 2007 From: ed.howland at gmail.com (Ed Howland) Date: Sun, 8 Apr 2007 14:02:08 -0500 Subject: [Masterview-users] Meant to have another maintenance release ready, but need to wait till end of next week In-Reply-To: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> References: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> Message-ID: <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> Jeff and Deb, Can you implement a Wiki on masterview.org? That would allow for user contributed content such as tips, work-arounds and user-developed directives. I think that would help fill in the gaps of Rails helpers vs. existing MV directives. And many other things. Ed On 4/7/07, Jeff Barczewski wrote: > I meant to have a maintenance release of MasterView done fixing some of the > minor issues that were identified on the list over the last several weeks, > however I got swamped at work and have not been able to get to wrapping it > up. Deb is also working on some better error messages for when the templates > don't parse, so that code should go in there as well. > > Tomorrow is Easter so I will be celebrating with my family and next week I > am taking the family to Solitude, UT to try and get in some spring skiing > (praying that they will have some decent snow, and a little powder would be > nice). So since I don't know whether I will have internet connectivity > there, I didn't want to rush out a release and possibly not be able to > resolve issues while I am there. Plus since the criticality of these fixes > is pretty low, I think we'd be better off waiting for a release late next > week. I am back on Friday. > > In the meantime if anyone needs the latest code for whatever reason, all my > fixes are checked in to the trunk if you want to pull the latest version > that way > svn://rubyforge.org/var/svn/masterview/trunk/masterview > however normally I would suggest using the release version unless you have > to get a fix or new feature. We go through additional testing and review > before we push out each release. > > Deb will be applying her changes there to the trunk too as soon as they are > ready. > > Late next week (when I am back) I will make the formal release moving the > svn release tag and building the new gem. > > The trunk of the development (unreleased code) is at > svn://rubyforge.org/var/svn/masterview/trunk/masterview > > The latest released code is always at > svn://rubyforge.org/var/svn/masterview/tags/masterview > > and > > Rubyforge and its mirrors contains the latest release of the gem. > > When I get back I plan to get onto many of the suggestions you have had > (better RadRails support out of the box, cleanup of generated rhtml, auto > copy files, ...) as well as discussing some of the new power directives I > have been working on. > > Have a happy Easter! > > Jeff > > > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > -- Ed Howland http://greenprogrammer.blogspot.com From david at koontzfamily.org Mon Apr 9 21:59:12 2007 From: david at koontzfamily.org (David Koontz) Date: Mon, 09 Apr 2007 18:59:12 -0700 Subject: [Masterview-users] mv:import for layouts Message-ID: <461AEF70.4070509@koontzfamily.org> I'm trying to use mv:import to pull in the layouts/application.rhtml. I have tried putting
content for page
hoping that Masterview would be able to make sense of that. It was probably a long shot and I got NoMethodError (You have a nil object when you didn't expect it! The error occurred while evaluating nil.gsub): /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/masterview/core_ext/pathname.rb:8:in `for_path' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/masterview/directive_helpers.rb:23:in `render_partial_name_to_file_name' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/masterview/analyzer.rb:165:in `start_element' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/masterview/analyzer.rb:159:in `each_pair' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/masterview/analyzer.rb:159:in `start_element' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/rexml/parsers/sax2parser_with_doctype_fix.rb:135:in `parse' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/rexml/parsers/sax2parser_with_doctype_fix.rb:134:in `each' /opt/local/lib/ruby/gems/1.8/gems/masterview-0.3.2/lib/rexml/parsers/sax2parser_with_doctype_fix.rb:134:in `parse' ... If this is not the proper way to handle design time inclusion of the layout, what would be a solution? David Koontz From irohiroki at gmail.com Tue Apr 10 20:18:51 2007 From: irohiroki at gmail.com (Hiroki Yoshioka) Date: Wed, 11 Apr 2007 09:18:51 +0900 Subject: [Masterview-users] mv:import for layouts In-Reply-To: <461AEF70.4070509@koontzfamily.org> References: <461AEF70.4070509@koontzfamily.org> Message-ID: <5d987c330704101718h4b897c39jed2a600a5fd92add@mail.gmail.com> On 4/10/07, David Koontz wrote: > I'm trying to use mv:import to pull in the layouts/application.rhtml. I > have tried putting > >
>
> content for page >
>
(snip) > If this is not the proper way to handle design time inclusion of the > layout, what would be a solution? inserting a
element between
and
should solve the problem. resulting code would be:
content for page
hiro From djlewis at acm.org Wed Apr 11 13:27:27 2007 From: djlewis at acm.org (Deb Lewis) Date: Wed, 11 Apr 2007 10:27:27 -0700 Subject: [Masterview-users] wiki suggestion In-Reply-To: <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> References: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> Message-ID: <001801c77c5e$ae458470$6402a8c0@cx797990aDLI9> Ed - excellent suggestion, I like it. Jeff's on vacation this week, let's pick up this conversation next week after he's back. Jeff's providing the hosting for masterview.org, so I'm not sure what he's got available in his platform setup relative to getting a wiki opened. Believe we can also set up a wiki with our masterview project on rubyforge, so if we go that way we'd add link to the wiki in our user docs and from masterview.org. ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Ed Howland Sent: Sunday, April 08, 2007 12:02 PM To: masterview-users at rubyforge.org Subject: Re: [Masterview-users] Meant to have another maintenance releaseready, but need to wait till end of next week Jeff and Deb, Can you implement a Wiki on masterview.org? That would allow for user contributed content such as tips, work-arounds and user-developed directives. I think that would help fill in the gaps of Rails helpers vs. existing MV directives. And many other things. Ed From ed.howland at gmail.com Wed Apr 11 18:57:54 2007 From: ed.howland at gmail.com (Ed Howland) Date: Wed, 11 Apr 2007 17:57:54 -0500 Subject: [Masterview-users] wiki suggestion In-Reply-To: <001801c77c5e$ae458470$6402a8c0@cx797990aDLI9> References: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> <001801c77c5e$ae458470$6402a8c0@cx797990aDLI9> Message-ID: <3df642dd0704111557oa48dfdeo2a71e22257bf591e@mail.gmail.com> On 4/11/07, Deb Lewis wrote: > Ed - excellent suggestion, I like it. > > Jeff's on vacation this week, let's pick up this conversation next week > after he's back. Jeff's providing the hosting for masterview.org, so I'm > not sure what he's got available in his platform setup relative to getting a > wiki opened. > > Believe we can also set up a wiki with our masterview project on rubyforge, > so if we go that way we'd add link to the wiki in our user docs and from > masterview.org. > Certainly sounds good. Other projects whose home pages are NOT on RF, sometimes link back to RF for their wiki. (BTW, is that Trac you are thinking of?) Ed -- Ed Howland http://greenprogrammer.blogspot.com From jarod at attollo.net Sat Apr 14 10:34:39 2007 From: jarod at attollo.net (Jarod Reid) Date: Sat, 14 Apr 2007 08:34:39 -0600 Subject: [Masterview-users] Problems with Masterview In-Reply-To: <19cda190704061117w8ff3324v2cbf5fc5d68bb5a6@mail.gmail.com> References: <46166170.6070207@attollo.net> <19cda190704061038s7b34f75ak8f47c09af0fdc002@mail.gmail.com> <4616896C.1090403@attollo.net> <19cda190704061117w8ff3324v2cbf5fc5d68bb5a6@mail.gmail.com> Message-ID: <4620E67F.90909@attollo.net> I got it to work by adding -e to the regex patter on line 542 in masterviews's initializer.rb. Yay! Jeff Barczewski wrote: > > > On 4/6/07, *Jarod Reid* > > wrote: > > Jeff Barczewski wrote: > > On 4/6/07, *Jarod Reid* >> > > wrote: > > > > I have been trying out Masterview and have yet to get it to > work. > > When I > > connect through the server (WEBRICK) after following the same > > steps for > > the demo I get... > > > > Missing template > ./script/../config/../app/views/store/list.rhtml > > > > I figured it out. I am using RadRails for development. When the server > is started in RadRails it shows: > > Program name = -e > > and the MasterView configuration terminates. RadRails does not > correctly > pass the program name. Is there possibly a way around this? > _______________________________________________ > > > > Yes, Lea Viljanen found this issue not too long ago. According to Lea, > the work around is to define a new set of web servers via the > "External tools" mechanism instead of relying on the default generated > web servers. > > I have it on my plate to see if I can come up with a better fix (one > that will work out of the box with RadRails) as well. > > Blessings, > > Jeff > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users From jeff.barczewski at gmail.com Sat Apr 14 18:31:26 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 14 Apr 2007 16:31:26 -0600 Subject: [Masterview-users] Meant to have another maintenance release ready, but need to wait till end of next week In-Reply-To: <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> References: <19cda190704071505v67d7ba27jd6c4a63171ac1f42@mail.gmail.com> <3df642dd0704081202m2bba828ct2fe4b49e1819718a@mail.gmail.com> Message-ID: <19cda190704141531n532d8c89g145c2dd1746d8dfa@mail.gmail.com> On 4/8/07, Ed Howland wrote: > > Jeff and Deb, > > Can you implement a Wiki on masterview.org? That would allow for user > contributed content such as tips, work-arounds and user-developed > directives. I think that would help fill in the > gaps of Rails helpers vs. existing MV directives. And many other things. > > Yes, we'll set something like this up. It would be a great thing to have. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070414/8d008166/attachment.html From jeff.barczewski at gmail.com Tue Apr 17 11:28:33 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 17 Apr 2007 10:28:33 -0500 Subject: [Masterview-users] mv:import for layouts In-Reply-To: <5d987c330704101718h4b897c39jed2a600a5fd92add@mail.gmail.com> References: <461AEF70.4070509@koontzfamily.org> <5d987c330704101718h4b897c39jed2a600a5fd92add@mail.gmail.com> Message-ID: <19cda190704170828r7afdf54bmbca8285d04f02479@mail.gmail.com> On 4/10/07, Hiroki Yoshioka wrote: > > On 4/10/07, David Koontz wrote: > > I'm trying to use mv:import to pull in the layouts/application.rhtml. I > > have tried putting > > > >
> >
> > content for page > >
> >
> (snip) > > > If this is not the proper way to handle design time inclusion of the > > layout, what would be a solution? > > inserting a
element > between
and
should solve the problem. > resulting code would be: > >
>
>
> content for page >
>
>
> > hiro > _______________________________________________ > David, Did Hiro's suggestion get you past your problem with importing application.rhtml? Regardless I think I am going to look into why your error occurred so it can be handled properly. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070417/532ec6f8/attachment.html From david at koontzfamily.org Thu Apr 19 13:21:02 2007 From: david at koontzfamily.org (David Koontz) Date: Thu, 19 Apr 2007 10:21:02 -0700 Subject: [Masterview-users] mv:import for layouts In-Reply-To: <19cda190704170828r7afdf54bmbca8285d04f02479@mail.gmail.com> References: <461AEF70.4070509@koontzfamily.org> <5d987c330704101718h4b897c39jed2a600a5fd92add@mail.gmail.com> <19cda190704170828r7afdf54bmbca8285d04f02479@mail.gmail.com> Message-ID: <4627A4FE.2030807@koontzfamily.org> Jeff Barczewski wrote: > On 4/10/07, *Hiroki Yoshioka* > wrote: > > On 4/10/07, David Koontz > wrote: > > I'm trying to use mv:import to pull in the > layouts/application.rhtml. I > > have tried putting > > > >
> >
> > content for page > >
> >
> (snip) > > > If this is not the proper way to handle design time inclusion of the > > layout, what would be a solution? > > inserting a
element > between
and
should solve the > problem. > resulting code would be: > >
>
>
> content for page >
>
>
> > hiro > _______________________________________________ > > > > David, > > Did Hiro's suggestion get you past your problem with importing > application.rhtml? > > Regardless I think I am going to look into why your error occurred so > it can be handled properly. > > Blessings, > > Jeff > ------------------------------------------------------------------------ Jeff, Yeah Hiro's suggestion did work. Is that the consensus for the "right" way to achieve that goal? Would it make sense to have a variation of import that automatically inserts the
? David Koontz From jeff.barczewski at gmail.com Fri Apr 20 17:02:25 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 20 Apr 2007 16:02:25 -0500 Subject: [Masterview-users] mv:import for layouts In-Reply-To: <4627A4FE.2030807@koontzfamily.org> References: <461AEF70.4070509@koontzfamily.org> <5d987c330704101718h4b897c39jed2a600a5fd92add@mail.gmail.com> <19cda190704170828r7afdf54bmbca8285d04f02479@mail.gmail.com> <4627A4FE.2030807@koontzfamily.org> Message-ID: <19cda190704201402wa3635bavf53f8e025c905992@mail.gmail.com> On 4/19/07, David Koontz wrote: > > Jeff Barczewski wrote: > > On 4/10/07, *Hiroki Yoshioka* > > wrote: > > > > On 4/10/07, David Koontz > > wrote: > > > I'm trying to use mv:import to pull in the > > layouts/application.rhtml. I > > > have tried putting > > > > > >
> > >
> > > content for page > > >
> > >
> > (snip) > > > > > If this is not the proper way to handle design time inclusion of > the > > > layout, what would be a solution? > > > > inserting a
element > > between
and
should solve the > > problem. > > resulting code would be: > > > >
> >
> >
> > content for page > >
> >
> >
> > > > hiro > > _______________________________________________ > > > > > > > > David, > > > > Did Hiro's suggestion get you past your problem with importing > > application.rhtml? > > > > Regardless I think I am going to look into why your error occurred so > > it can be handled properly. > > > > Blessings, > > > > Jeff > > ------------------------------------------------------------------------ > Jeff, > > Yeah Hiro's suggestion did work. Is that the consensus for the "right" > way to achieve that goal? Would it make sense to have a variation of > import that automatically inserts the
mv:replace="@content_for_layout">? > > David Koontz I'll take a closer look at that. We do want it to be as easy as possible to use. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070420/c71e36ad/attachment.html From framallo at gmail.com Fri Apr 20 17:25:38 2007 From: framallo at gmail.com (Federico Ramallo) Date: Fri, 20 Apr 2007 18:25:38 -0300 Subject: [Masterview-users] goldberg and masterview plugins Message-ID: <46292FD2.1000901@gmail.com> hi I'm trying to use both plugins, but have some errors... http://goldberg.240gl.org/ What i have done so far: * I install both plugins with gem * create a new rails project * run: * ruby script/generate masterview_plugin * script/generate masterview client clients The layout is in app/views/clients/list.html and Masterview generates /layouts/clients.rhtml on startup. then i installed goldberg |*gem install goldberg_generator| * script/generate goldberg template * change security for masterview controller and i want to use the application.rhtml layout from goldberg, so i remove the: mv:generate="layouts/clients.rhtml" now i use layout/application.rhtml for clients controller Until here everything worked fine (ugly, but without errors Smile ) * now i rename application.rhtml to application.html and add in the html tag: mv:generate="layouts/application.rhtml" here i have this error in http://localhost:3000/ Missing layout ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml but i have no error in http://localhost:3000/clients any ideas? i guess that goldberg is looking for the template before masterview generate it..... Thanks in advance From jeff.barczewski at gmail.com Fri Apr 20 17:41:27 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 20 Apr 2007 16:41:27 -0500 Subject: [Masterview-users] goldberg and masterview plugins In-Reply-To: <46292FD2.1000901@gmail.com> References: <46292FD2.1000901@gmail.com> Message-ID: <19cda190704201441k69442801y557d3dd15bd87f45@mail.gmail.com> On 4/20/07, Federico Ramallo wrote: > > hi > > I'm trying to use both plugins, but have some errors... > > http://goldberg.240gl.org/ > > What i have done so far: > * I install both plugins with gem > * create a new rails project > * run: > * ruby script/generate masterview_plugin > * script/generate masterview client clients > > The layout is in app/views/clients/list.html and Masterview generates > /layouts/clients.rhtml on startup. > > then i installed goldberg > > |*gem install goldberg_generator| > > * script/generate goldberg template > * change security for masterview controller > > and i want to use the application.rhtml layout from goldberg, so i > remove the: mv:generate="layouts/clients.rhtml" > now i use layout/application.rhtml for clients controller > Until here everything worked fine (ugly, but without errors Smile ) > * now i rename application.rhtml to application.html and add in the html > tag: mv:generate="layouts/application.rhtml" > > here i have this error in http://localhost:3000/ > > Missing layout > > ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml > > > but i have no error in http://localhost:3000/clients > > any ideas? > i guess that goldberg is looking for the template before masterview > generate it..... > > I am not aware of any incompatibilities between the two plugins. The way that MasterView hooks into rails, I doubt that there would be a problem in that goldberg is not able to find the template. I'm guessing that maybe it is just a slight typo or something somewhere in the setup. Could you browse to the masterview admin page and paste a screenshot for me here, that might help in determining what is wrong. And if you don't have anything too private in there yet, you could even zip up the files and post them as well and I can take a look directly if the screenshot doesn't tell us enough. I have certainly used layout/application.rhtml across my pages as well so that is a common thing to do. If there turns out to be any incompatibility then I'll do my best to resolve it, but lets start the debugging and see where it leads us. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070420/cf0d112e/attachment.html From framallo2 at gmail.com Sat Apr 21 09:40:39 2007 From: framallo2 at gmail.com (Federico Ramallo) Date: Sat, 21 Apr 2007 10:40:39 -0300 Subject: [Masterview-users] goldberg and masterview plugins In-Reply-To: <19cda190704201441k69442801y557d3dd15bd87f45@mail.gmail.com> References: <46292FD2.1000901@gmail.com> <19cda190704201441k69442801y557d3dd15bd87f45@mail.gmail.com> Message-ID: <462A1457.40203@gmail.com> i also send you the db... i guess that by granting execute to the controller the action , is this correct? thanks Federico Ramallo Jeff Barczewski wrote: > On 4/20/07, *Federico Ramallo* > wrote: > > hi > > I'm trying to use both plugins, but have some errors... > > http://goldberg.240gl.org/ > > > What i have done so far: > * I install both plugins with gem > * create a new rails project > * run: > * ruby script/generate masterview_plugin > * script/generate masterview client clients > > The layout is in app/views/clients/list.html and Masterview generates > /layouts/clients.rhtml on startup. > > then i installed goldberg > > |*gem install goldberg_generator| > > * script/generate goldberg template > * change security for masterview controller > > and i want to use the application.rhtml layout from goldberg, so i > remove the: mv:generate="layouts/clients.rhtml" > now i use layout/application.rhtml for clients controller > Until here everything worked fine (ugly, but without errors Smile ) > * now i rename application.rhtml to application.html and add in > the html > tag: mv:generate="layouts/application.rhtml" > > here i have this error in http://localhost:3000/ > > > Missing layout > ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml > > > but i have no error in http://localhost:3000/clients > > > any ideas? > i guess that goldberg is looking for the template before masterview > generate it..... > > > > I am not aware of any incompatibilities between the two plugins. The > way that MasterView hooks into rails, I doubt that there would be a > problem in that goldberg is not able to find the template. I'm > guessing that maybe it is just a slight typo or something somewhere in > the setup. > > Could you browse to the masterview admin page and paste a screenshot > for me here, that might help in determining what is wrong. And if you > don't have anything too private in there yet, you could even zip up > the files and post them as well and I can take a look directly if the > screenshot doesn't tell us enough. > > I have certainly used layout/application.rhtml across my pages as well > so that is a common thing to do. > > If there turns out to be any incompatibility then I'll do my best to > resolve it, but lets start the debugging and see where it leads us. > > Thanks, > > Jeff > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070421/b94dc524/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: db.sql.gz Type: application/gzip Size: 7672 bytes Desc: not available Url : http://rubyforge.org/pipermail/masterview-users/attachments/20070421/b94dc524/attachment.bin From jeff.barczewski at gmail.com Sat Apr 21 14:10:59 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 21 Apr 2007 13:10:59 -0500 Subject: [Masterview-users] Auto copy feature added to MasterView trunk Message-ID: <19cda190704211110x7ea607e8ge6154c539728f88d@mail.gmail.com> MasterView users, I have just added an auto copy feature to the MasterView trunk (which will be in the next release). I clipped this out of the configuration document, let me know if anything is unclear or if there is anything critical missing in this feature. ---------------- config.auto_copy_file_entries controls what MasterView will automatically copy Locations of files that MasterView will autocopy to a runtime location This autocopy feature makes it easy to have prototypes that display properly for WYSIWYG editing and design, using files (images, stylesheets, and javascript) which are not in the standard Rails locations but are automatically copied to proper place for runtime. This is commonly used in conjunction with template_src_dir_path (which changes the location of the source MasterView templates). Developers can have their templates in a non-standard location along with images, stylesheets, and javascript, and then still have everything copied to the proper runtime locations when Rails is fired up. In debug mode, timestamps are checked on every request, in production mode, copy is done only on startup. Each entry is a hash that needs to contain - :source => 'path to source folder' # absolute or relative to RAILS_ROOT - :destination => 'path to place to copy to' # absolute or relative to RAILS_ROOT and can optionally have a file extension filter - :extensions => [:gif, :GIF, :jpg, :JPG] # limit files copied to this array of extensions, case sensitive Default: [] # nothing will be auto copied Example usage showing three paths added to be auto copied: config.auto_copy_file_entries << { :source => 'images', :destination => 'public/images' } config.auto_copy_file_entries << { :source => 'scripts', :destination => 'public/javascripts', :extensions => [:js, :JS] } # only copy js files config.auto_copy_file_entries << { :source => 'css', :destination => 'public/stylesheets' } (These examples are also in the latest example settings.rb config file which is installed when using script/generate masterview_plugin) Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070421/008a48a1/attachment-0001.html From framallo2 at gmail.com Sat Apr 21 01:35:04 2007 From: framallo2 at gmail.com (Federico Ramallo) Date: Sat, 21 Apr 2007 02:35:04 -0300 Subject: [Masterview-users] goldberg and masterview plugins In-Reply-To: <19cda190704201441k69442801y557d3dd15bd87f45@mail.gmail.com> References: <46292FD2.1000901@gmail.com> <19cda190704201441k69442801y557d3dd15bd87f45@mail.gmail.com> Message-ID: <4629A288.400@gmail.com> Great! I'm sending the source code. you can create the tables with *rake db:migrate *I could find that if i rename *application.html *to *application.rhtml* it works fine also found in *vendor/plugins/goldberg/lib/goldberg_controller.rb *the *layout *and *template_root methods, *they are used in vendor/plugins/goldberg/app/controllers/goldberg/* si i guess to possible sources: its a path problem or a problem in self.included(base). I vote for the first one, because when i access to *http://localhost:3000/clientes2 *i can see the layout but when i go to anything related to goldberg i have the template error: http://localhost:3000/goldberg/users/list * base.template_root = File.join("#{File.dirname(__FILE__)}/../app/views")* gives me in console *"./script/../config/../config/../vendor/plugins/goldberg/lib/../app/views"* What are the /../ one dir up or allow multiple paths?? (like ; in windows's path) also found that * base.layout "../../../../../app/views/layouts/application" *is completed with *".rhtml" at the end Thanks Federico Ramallo * Jeff Barczewski wrote: > On 4/20/07, *Federico Ramallo* > wrote: > > hi > > I'm trying to use both plugins, but have some errors... > > http://goldberg.240gl.org/ > > > What i have done so far: > * I install both plugins with gem > * create a new rails project > * run: > * ruby script/generate masterview_plugin > * script/generate masterview client clients > > The layout is in app/views/clients/list.html and Masterview generates > /layouts/clients.rhtml on startup. > > then i installed goldberg > > |*gem install goldberg_generator| > > * script/generate goldberg template > * change security for masterview controller > > and i want to use the application.rhtml layout from goldberg, so i > remove the: mv:generate="layouts/clients.rhtml" > now i use layout/application.rhtml for clients controller > Until here everything worked fine (ugly, but without errors Smile ) > * now i rename application.rhtml to application.html and add in > the html > tag: mv:generate="layouts/application.rhtml" > > here i have this error in http://localhost:3000/ > > > Missing layout > ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml > > > but i have no error in http://localhost:3000/clients > > > any ideas? > i guess that goldberg is looking for the template before masterview > generate it..... > > > > I am not aware of any incompatibilities between the two plugins. The > way that MasterView hooks into rails, I doubt that there would be a > problem in that goldberg is not able to find the template. I'm > guessing that maybe it is just a slight typo or something somewhere in > the setup. > > Could you browse to the masterview admin page and paste a screenshot > for me here, that might help in determining what is wrong. And if you > don't have anything too private in there yet, you could even zip up > the files and post them as well and I can take a look directly if the > screenshot doesn't tell us enough. > > I have certainly used layout/application.rhtml across my pages as well > so that is a common thing to do. > > If there turns out to be any incompatibility then I'll do my best to > resolve it, but lets start the debugging and see where it leads us. > > Thanks, > > Jeff > ------------------------------------------------------------------------ > > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070421/95c664d7/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image002.jpg Type: image/jpeg Size: 45669 bytes Desc: not available Url : http://rubyforge.org/pipermail/masterview-users/attachments/20070421/95c664d7/attachment-0001.jpg -------------- next part -------------- A non-text attachment was scrubbed... Name: posmvgoldberg.rar Type: application/octet-stream Size: 268371 bytes Desc: not available Url : http://rubyforge.org/pipermail/masterview-users/attachments/20070421/95c664d7/attachment-0001.obj From david at koontzfamily.org Sat Apr 21 14:39:28 2007 From: david at koontzfamily.org (David Koontz) Date: Sat, 21 Apr 2007 11:39:28 -0700 Subject: [Masterview-users] Auto copy feature added to MasterView trunk In-Reply-To: <19cda190704211110x7ea607e8ge6154c539728f88d@mail.gmail.com> References: <19cda190704211110x7ea607e8ge6154c539728f88d@mail.gmail.com> Message-ID: <462A5A60.3000005@koontzfamily.org> Awesome, thanks Jeff! > MasterView users, > > I have just added an auto copy feature to the MasterView trunk (which > will be in the next release). I clipped this out of the configuration > document, let me know if anything is unclear or if there is anything > critical missing in this feature. > > ---------------- > > config.auto_copy_file_entries controls what MasterView will > automatically copy > > Locations of files that MasterView will autocopy to a runtime location > This autocopy feature makes it easy to have prototypes that display > properly for WYSIWYG editing and design, using files (images, > stylesheets, and javascript) which are not in the standard Rails > locations but are automatically copied to proper place for runtime. > This is commonly used in conjunction with template_src_dir_path (which > changes the location of the source MasterView templates). Developers > can have their templates in a non-standard location along with images, > stylesheets, and javascript, and then still have everything copied to > the proper runtime locations when Rails is fired up. > > In debug mode, timestamps are checked on every request, in production > mode, copy is done only on startup. > > Each entry is a hash that needs to contain > > * :source => 'path to source folder' # absolute or relative to > RAILS_ROOT > * :destination => 'path to place to copy to' # absolute or > relative to RAILS_ROOT > > and can optionally have a file extension filter > > * :extensions => [:gif, :GIF, :jpg, :JPG] # limit files copied to > this array of extensions, case sensitive > > > Default: [] # nothing will be auto copied > > Example usage showing three paths added to be auto copied: > config.auto_copy_file_entries << { :source => 'images', :destination > => 'public/images' } > config.auto_copy_file_entries << { :source => 'scripts', :destination > => 'public/javascripts', :extensions => [:js, :JS] } # only copy js files > config.auto_copy_file_entries << { :source => 'css', :destination => > 'public/stylesheets' } > > (These examples are also in the latest example settings.rb config file > which is installed when using script/generate masterview_plugin) > > > Thanks, > > Jeff From jeff.barczewski at gmail.com Sun Apr 22 08:47:57 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sun, 22 Apr 2007 07:47:57 -0500 Subject: [Masterview-users] goldberg and masterview plugins In-Reply-To: <46292FD2.1000901@gmail.com> References: <46292FD2.1000901@gmail.com> Message-ID: <19cda190704220547m16be6e80vf4455fa24d10eb5f@mail.gmail.com> On 4/20/07, Federico Ramallo wrote: > > hi > > I'm trying to use both plugins, but have some errors... > > http://goldberg.240gl.org/ > > What i have done so far: > * I install both plugins with gem > * create a new rails project > * run: > * ruby script/generate masterview_plugin > * script/generate masterview client clients > > The layout is in app/views/clients/list.html and Masterview generates > /layouts/clients.rhtml on startup. > > then i installed goldberg > > |*gem install goldberg_generator| > > * script/generate goldberg template > * change security for masterview controller > > and i want to use the application.rhtml layout from goldberg, so i > remove the: mv:generate="layouts/clients.rhtml" > now i use layout/application.rhtml for clients controller > Until here everything worked fine (ugly, but without errors Smile ) > * now i rename application.rhtml to application.html and add in the html > tag: mv:generate="layouts/application.rhtml" > > here i have this error in http://localhost:3000/ > > Missing layout > > ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml > > > but i have no error in http://localhost:3000/clients > > any ideas? > i guess that goldberg is looking for the template before masterview > generate it..... > > Well you are right, goldberg is changing something in the environment that is having problems locating the application.rhtml properly when hitting the root page. I am continuing to look into it and will look at the methods that you mentioned in your last email. In the meantime, I wanted to share with you some config options that would serve as a work around while I look into this. If we turn on rhtml generation in MasterView then MasterView will generate the rhtml files to the file system and everything will work with goldberg. However as you probably know then you will have a mix of html and rhtml files in your view directories which can be confusing. So if you want to do this here is what will make it cleaner... Move all your directories (containing your MasterView html templates) from app/views into something like app/masterview (just anything besides app/views) and then set the following config settings in config/masterview/settings.rb config.template_src_dir_path = 'app/masterview' # relative path from config.root_path config.generate_rhtml_files = true # compile directly to Rails view cache Then when you start up MasterView the rhtml files will be generated directly into app/views and Goldberg will be happy. Once I figure out the real fix, then we can delete everything in app/views and move the app/masterview stuff back to app/view and remove the config changes. I will keep you posted of my progress. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070422/69cfe371/attachment.html From jeff.barczewski at gmail.com Mon Apr 23 15:25:39 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 23 Apr 2007 14:25:39 -0500 Subject: [Masterview-users] goldberg and masterview plugins In-Reply-To: <19cda190704220547m16be6e80vf4455fa24d10eb5f@mail.gmail.com> References: <46292FD2.1000901@gmail.com> <19cda190704220547m16be6e80vf4455fa24d10eb5f@mail.gmail.com> Message-ID: <19cda190704231225i31a12296k3bbdedf02c02d6a9@mail.gmail.com> On 4/22/07, Jeff Barczewski wrote: > > On 4/20/07, Federico Ramallo wrote: > > > > hi > > > > I'm trying to use both plugins, but have some errors... > > > > http://goldberg.240gl.org/ > > > > What i have done so far: > > * I install both plugins with gem > > * create a new rails project > > * run: > > * ruby script/generate masterview_plugin > > * script/generate masterview client clients > > > > The layout is in app/views/clients/list.html and Masterview generates > > /layouts/clients.rhtml on startup. > > > > then i installed goldberg > > > > |*gem install goldberg_generator| > > > > * script/generate goldberg template > > * change security for masterview controller > > > > and i want to use the application.rhtml layout from goldberg, so i > > remove the: mv:generate="layouts/clients.rhtml" > > now i use layout/application.rhtml for clients controller > > Until here everything worked fine (ugly, but without errors Smile ) > > * now i rename application.rhtml to application.html and add in the html > > tag: mv:generate="layouts/application.rhtml" > > > > here i have this error in http://localhost:3000/ > > > > Missing layout > > > > ./script/../config/../vendor/plugins/goldberg/lib/../app/views/../../../../../app/views/layouts/application.rhtml > > > > > > but i have no error in http://localhost:3000/clients > > > > any ideas? > > i guess that goldberg is looking for the template before masterview > > generate it..... > > > > > > Well you are right, goldberg is changing something in the environment that > is having problems locating the application.rhtml properly when hitting > the root page. > > I am continuing to look into it and will look at the methods that you > mentioned in your last email. > > In the meantime, I wanted to share with you some config options that would > serve as a work around while I look into this. If we turn on rhtml > generation in MasterView then MasterView will generate the rhtml files to > the file system and everything will work with goldberg. However as you > probably know then you will have a mix of html and rhtml files in your view > directories which can be confusing. So if you want to do this here is what > will make it cleaner... > > Move all your directories (containing your MasterView html templates) from > app/views into something like app/masterview (just anything besides > app/views) and then set the following config settings in > config/masterview/settings.rb > > config.template_src_dir_path = 'app/masterview' # relative path from > config.root_path > config.generate_rhtml_files = true # compile directly to Rails view cache > > Then when you start up MasterView the rhtml files will be generated > directly into app/views and Goldberg will be happy. Once I figure out the > real fix, then we can delete everything in app/views and move the > app/masterview stuff back to app/view and remove the config changes. > > Just an update on my progress with this. After digging into this I found that the problem occurs because Goldberg changes the base_path for its views as Federico suggested. I have created a solution to this that now takes the base_path into account and will work properly now if Goldberg, other plugins, or controllers change this value from the default. I am working up test cases that will exercise all the scenarios and once that is done, I will check into svn. The refactoring is a decent amount of code, so I want to make sure I have good test coverage before uploading. Hopefully the work around I suggested Saturday (using config.template_src_dir_path and config.generate_rhtml_files) will suffice until I can get this checked in (hopefully in the next day or so). Blessings, Jeff ** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070423/99bbb7b6/attachment.html From david at koontzfamily.org Fri Apr 27 05:00:41 2007 From: david at koontzfamily.org (David Koontz) Date: Fri, 27 Apr 2007 02:00:41 -0700 Subject: [Masterview-users] Giving default value to hidden field Message-ID: <4631BBB9.4090609@koontzfamily.org> I was wondering if there's a way to get a value into the hidden_field tag generated by mv:hidden_field. Currently the value attribute of the html input tag is not being used, could it perhaps become a :value => hash on the hidden_input rails helper? David Koontz From david at koontzfamily.org Fri Apr 27 14:39:04 2007 From: david at koontzfamily.org (David Koontz) Date: Fri, 27 Apr 2007 11:39:04 -0700 Subject: [Masterview-users] Javascript for offline forms Message-ID: <46324348.8030207@koontzfamily.org> I noticed in the literature for Masterview that the offline pages are capable of having javascript links for the forms so that they are navigable. I haven't been able to find any information on actually enabling this. Am I totally off base on this? David Koontz From jeff.barczewski at gmail.com Sun Apr 29 22:14:01 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sun, 29 Apr 2007 21:14:01 -0500 Subject: [Masterview-users] Giving default value to hidden field In-Reply-To: <4631BBB9.4090609@koontzfamily.org> References: <4631BBB9.4090609@koontzfamily.org> Message-ID: <19cda190704291914h2f96402cif10dc349838d0294@mail.gmail.com> On 4/27/07, David Koontz wrote: > > I was wondering if there's a way to get a value into the hidden_field > tag generated by mv:hidden_field. Currently the value attribute of the > html input tag is not being used, could it perhaps become a :value => > hash on the hidden_input rails helper? > Yes, the mv:hidden_field currently is used to populate the hidden tag using an object and method (like from ActiveRecord). If you want to dynamically set the value from somewhere else, you can use the mv:attr directive instead. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070429/3b198b2d/attachment-0001.html From jeff.barczewski at gmail.com Sun Apr 29 22:57:36 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sun, 29 Apr 2007 21:57:36 -0500 Subject: [Masterview-users] Javascript for offline forms In-Reply-To: <46324348.8030207@koontzfamily.org> References: <46324348.8030207@koontzfamily.org> Message-ID: <19cda190704291957h589f3d66ncd882b57f8e5c386@mail.gmail.com> On 4/27/07, David Koontz wrote: > > I noticed in the literature for Masterview that the offline pages are > capable of having javascript links for the forms so that they are > navigable. I haven't been able to find any information on actually > enabling this. Am I totally off base on this? > > Yes MasterView has some javascript that can be used to make offline pages navigate as if they were running in rails. If you generate some pages using the generator, then you can see how these are used. It isn't necessary to use the generator to use the javascript, but it will give you an example of how it is used. Here is roughly how it works. First, for the links, we just put the href to the other view, so they work as you would think, nothing fancy there. Second, for the buttons, we use javascript to register onclick events with the buttons so that they also go to the proper offline page. The generator uses specific crud based class names that it looks for and what to link it to. Third, we copy and remove sections, and finally we adjust some of the messages on the pages. You'll see this activated by a javascript inclusion at the bottom of the pages. The script also changes some messages, copies sections, removes sections, etc., all things to help the prototype look more like it would when running. You are right that we haven't documented this as we should have. I will put this as a todo item. In the meantime, I'd recommend that you try out the generator (script/generator masterview Foo Bar) and see what it creates and post up any additional questions you have. We'll take these and use them for the new documentation. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070429/c7a8f3cb/attachment.html