James Britt
2007-Jul-02 23:38 UTC
[Masterview-users] Forcing a rebuild of all templates from the command line
I may be doing something wrong, but I can not get my rhtml view files re-built on-demand. For example, if I delete all the rhtml that have been generated from MasterView HTML files, and call the rake task mv:rebuild_all, I do not see the rhtml files recreated. If I go through the MasterView admin Web page it seems to work, but only if I go and alter the html files. (Running ''touch'' on the files doesn''t help.) It seems that the rhtml files do not get created unless MasterView thinks the source HTML has changed, even if the rhtml files do not exist. And then only via the Web tool. Thanks, -- James Britt
Jeff Barczewski
2007-Jul-03 11:40 UTC
[Masterview-users] Forcing a rebuild of all templates from the command line
On 7/2/07, James Britt <james.britt at gmail.com> wrote:> > I may be doing something wrong, but I can not get my rhtml view files > re-built on-demand. > > For example, if I delete all the rhtml that have been generated from > MasterView HTML files, and call the rake task mv:rebuild_all, I do not > see the rhtml files recreated. > > If I go through the MasterView admin Web page it seems to work, but only > if I go and alter the html files. (Running ''touch'' on the files doesn''t > help.) > > > It seems that the rhtml files do not get created unless MasterView > thinks the source HTML has changed, even if the rhtml files do not > exist. And then only via the Web tool.I''ll take a look and see if I can figure out what might be going wrong. Thanks for mentioning it. -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070703/3be83629/attachment.html
Jeff Barczewski
2007-Jul-03 14:18 UTC
[Masterview-users] Forcing a rebuild of all templates from the command line
On 7/3/07, Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> > On 7/2/07, James Britt <james.britt at gmail.com> wrote: > > > > I may be doing something wrong, but I can not get my rhtml view files > > re-built on-demand. > > > > For example, if I delete all the rhtml that have been generated from > > MasterView HTML files, and call the rake task mv:rebuild_all, I do not > > see the rhtml files recreated. > > > > If I go through the MasterView admin Web page it seems to work, but only > > if I go and alter the html files. (Running ''touch'' on the files doesn''t > > help.) > > > > > > It seems that the rhtml files do not get created unless MasterView > > thinks the source HTML has changed, even if the rhtml files do not > > exist. And then only via the Web tool. > > > > I''ll take a look and see if I can figure out what might be going wrong. > Thanks for mentioning it.James, I took a look and the code appears to be functioning properly, however I believe our documentation wasn''t clear about which rake task does what so this may be the source of the problem. rake mv:parse # is the one which generates the rhtml files mv:rebuild and mv:rebuild_all actually only update the HTML template files (if they have outdated imports) not the rhtml that is generated I guess the naming of these wasn''t the greatest. I have updated the docs on MV website to clarify this a little and have made a change for the next release to use the rake task name mv:generate_all_rhtml (deprecating mv:parse) so that hopefully this will be a little clearer to people in the future. For now you can use rake mv:parse in next version 0.3.4 this will be the preferred task rake mv:generate_all_rhtml Sorry for the confusion. Also note that if you want files generated to file system you will need to set the config.generate_rhtml_files = true in config/masterview/settings.rb or the appropriate config/masterview/environments/*.rb, otherwise the rhtml is generated only internally. PS. I haven''t forgotten about the sidebar content_for issue, just haven''t come up with a good approach to solving it yet. Let me know if you have any additional problems. Blessings, Jeff -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070703/9c54d6df/attachment.html