D. Bruce Moore
2006-Aug-17 11:00 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
I do this in ASP to read a special html template that I use, then modify in code before spitting out the resulting webpage. Any ideas on how to script this in RUBY? Do I need a special GEM package? D. Bruce Moore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/95cf5da6/attachment.html
Nicholas H.Tollervey
2006-Aug-17 11:41 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
Hi Bruce, This is in essence what the "view" files are for. Check out the tutorials and docs linked on this page: http://www.rubyonrails.com/docs for help understanding how the framework works. It really is deceptively simple. Best of luck and have fun... Nicholas D. Bruce Moore wrote:> > > I do this in ASP to read a special html template that I use, then modify > in code before spitting out the resulting webpage. > > > > Any ideas on how to script this in RUBY? Do I need a special GEM package? > > D. Bruce Moore > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
D. Bruce Moore
2006-Aug-17 15:44 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
Thanks, Nicholas! I have looked over the VIEWS documentation and I find that I still want to be able to read an html file and handle the output myself. Can this be done? Code suggestions? D. Bruce Moore, BA, BGS, Dipl, MCP www.Gracenote.ca Winnipeg, MB (204) 772-5483 -----Original Message----- From: Nicholas H.Tollervey [mailto:ntoll@ntoll.org] Sent: August 17, 2006 6:41 AM To: bruce@gracenote.ca; rails@lists.rubyonrails.org Subject: Re: [Rails] Can I get RubyOnRails to read and parse an html file off harddrive? Hi Bruce, This is in essence what the "view" files are for. Check out the tutorials and docs linked on this page: http://www.rubyonrails.com/docs for help understanding how the framework works. It really is deceptively simple. Best of luck and have fun... Nicholas D. Bruce Moore wrote:> > > I do this in ASP to read a special html template that I use, then modify > in code before spitting out the resulting webpage. > > > > Any ideas on how to script this in RUBY? Do I need a special GEM package? > > D. Bruce Moore > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.1/421 - Release Date: 16/08/2006
Austin Govella
2006-Aug-17 15:56 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
You can store templates anywhere (in the view dir, elsewhere on the server, in a database, on another server) and process them anyway you''d like before returning them to the client. You can do any processing you want using Ruby. I''m assuming the processing code would go in the Controller. If you want to wrap common output in simple functions, you can use helpers, and there''s a templating language called Radius: * http://rubyforge.org/projects/radius -- Austin Govella Thinking & Making: IA, UX, and IxD http://thinkingandmaking.com austin.govella@gmail.com
Bill Walton
2006-Aug-17 16:06 UTC
[Rails] Can I get RubyOnRails to read and parse an html file offharddrive?
Hi Bruce, D. Bruce Moore wrote:> ... to read a special html template that I use, > then modify in code before spitting out the > resulting webpage.One approach would be to use REXML to read / write the file, then use ''render :file => ... '' to display the web page. hth, Bill
D. Bruce Moore
2006-Aug-17 16:09 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
Thanks Austin! What I want to do is use my favourite html editor and embed my own (not use the "<%") tags for some specialized content. I do NOT want to use the "<%" stuff as the formatting looks wrong in my html editor. If I create my own template methodology (did this easy in ASP) my productivity goes up significantly. I tried using Files.open but got some error...do I need to install some GEM or something to use FILES commands? D. Bruce Moore, BA, BGS, Dipl, MCP www.Gracenote.ca Winnipeg, MB (204) 772-5483 -----Original Message----- From: Austin Govella [mailto:austin.govella@gmail.com] Sent: August 17, 2006 10:56 AM To: bruce@gracenote.ca; rails@lists.rubyonrails.org Cc: Nicholas H.Tollervey Subject: Re: [Rails] Can I get RubyOnRails to read and parse an html file off harddrive? You can store templates anywhere (in the view dir, elsewhere on the server, in a database, on another server) and process them anyway you''d like before returning them to the client. You can do any processing you want using Ruby. I''m assuming the processing code would go in the Controller. If you want to wrap common output in simple functions, you can use helpers, and there''s a templating language called Radius: * http://rubyforge.org/projects/radius -- Austin Govella Thinking & Making: IA, UX, and IxD http://thinkingandmaking.com austin.govella@gmail.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.1/421 - Release Date: 16/08/2006
zer0halo
2006-Aug-17 19:38 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
On 8/17/06, D. Bruce Moore <bruce@gracenote.ca> wrote:> > Thanks Austin! > > What I want to do is use my favourite html editor and embed my own (not > use > the "<%") tags for some specialized content. > > I do NOT want to use the "<%" stuff as the formatting looks wrong in my > html > editor. If I create my own template methodology (did this easy in ASP) my > productivity goes up significantly.Are you sure you want to use Rails then? Seems like you lose a lot of the benefits of Rails by not using the Ruby commands inside your view files. There are html editors that will show the ruby codes nicely in your rhtml files. I tried using Files.open but got some error...do I need to install some GEM> or something to use FILES commands?No, just plain Ruby should work. Try the commands out using irb (interactive ruby at command line) to try to figure out what problem you might be facing. Then once you''ve nailed it down, integrate the commands into your code. -- "Impossible is nothing." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/0cb790d8/attachment.html
Charlie Bowman
2006-Aug-17 20:22 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
I agree, you need to go back to .asp if you don''t like rails views On 8/17/06, zer0halo <zerohalo@gmail.com> wrote:> > > > On 8/17/06, D. Bruce Moore <bruce@gracenote.ca> wrote: > > Thanks Austin! > > > > What I want to do is use my favourite html editor and embed my own (not > use > > the "<%") tags for some specialized content. > > > > I do NOT want to use the "<%" stuff as the formatting looks wrong in my > html > > editor. If I create my own template methodology (did this easy in ASP) my > > productivity goes up significantly. > > > Are you sure you want to use Rails then? Seems like you lose a lot of the > benefits of Rails by not using the Ruby commands inside your view files. > There are html editors that will show the ruby codes nicely in your rhtml > files. > > > I tried using Files.open but got some error...do I need to install some > GEM > > or something to use FILES commands? > > > No, just plain Ruby should work. Try the commands out using irb (interactive > ruby at command line) to try to figure out what problem you might be facing. > Then once you''ve nailed it down, integrate the commands into your code. > > > > > > > -- > "Impossible is nothing." > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
D. Bruce Moore
2006-Aug-17 21:15 UTC
[Rails] Can I get RubyOnRails to read and parse an html file off harddrive?
Thanks, Zero Where can I find one of these editors (is it WYSIWYG )? ____________________________________ D. Bruce Moore, BA, BGS, Dipl, MCP -----Original message----- From: zer0halo zerohalo@gmail.com Date: Thu, 17 Aug 2006 14:38:01 -0700 To: bruce@gracenote.ca Subject: Re: [Rails] Can I get RubyOnRails to read and parse an html file off harddrive?> On 8/17/06, D. Bruce Moore <bruce@gracenote.ca> wrote: > > > > Thanks Austin! > > > > What I want to do is use my favourite html editor and embed my own (not > > use > > the "<%") tags for some specialized content. > > > > I do NOT want to use the "<%" stuff as the formatting looks wrong in my > > html > > editor. If I create my own template methodology (did this easy in ASP) my > > productivity goes up significantly. > > > Are you sure you want to use Rails then? Seems like you lose a lot of the > benefits of Rails by not using the Ruby commands inside your view files. > There are html editors that will show the ruby codes nicely in your rhtml > files. > > I tried using Files.open but got some error...do I need to install some GEM > > or something to use FILES commands? > > > No, just plain Ruby should work. Try the commands out using irb (interactive > ruby at command line) to try to figure out what problem you might be facing. > Then once you''ve nailed it down, integrate the commands into your code. > > > > > > > -- > "Impossible is nothing." > >
Bill
2006-Aug-17 23:06 UTC
[Rails] Re: Can I get RubyOnRails to read and parse an html file off
Charlie Bowman wrote:> I agree, you need to go back to .asp if you don''t like rails viewsI disagree with that. I recall seeing a markup for Rails that was HTML editor friendly. Was it Markaby or something else? It was specifically created to allow designers to work with the Rails templates. Anyone recall what I''m referring to? Bill -- Posted via http://www.ruby-forum.com/.
Bill
2006-Aug-17 23:09 UTC
[Rails] Re: Can I get RubyOnRails to read and parse an html file off
Bill wrote:> Charlie Bowman wrote: >> I agree, you need to go back to .asp if you don''t like rails views > > I disagree with that. I recall seeing a markup for Rails that was HTML > editor friendly. Was it Markaby or something else? It was specifically > created to allow designers to work with the Rails templates. > > Anyone recall what I''m referring to? > > BillI''ll answer my question. It was Masterview but the site appears to not be responding. I can see it in google''s cache. Bill -- Posted via http://www.ruby-forum.com/.
Jeff Barczewski
2006-Aug-19 15:51 UTC
[Rails] Re: Can I get RubyOnRails to read and parse an html file off
MasterView site ( http://masterview.org/ ) was intermittently down as we were upgrading some sites to be compatible with rails 1.1.6. We are done with the upgrades other than a hardware issue I am having tech support look at. I wouldn''t expect much downtime from this. Let me know if you are still having trouble getting to the site. Also note that project is stored on Rubyforge.org so one can always pull gem from there. http://rubyforge.org/projects/masterview Thanks, Jeff On 8/17/06, Bill <devaulw@onebox.com> wrote:> Bill wrote: > > Charlie Bowman wrote: > >> I agree, you need to go back to .asp if you don''t like rails views > > > > I disagree with that. I recall seeing a markup for Rails that was HTML > > editor friendly. Was it Markaby or something else? It was specifically > > created to allow designers to work with the Rails templates. > > > > Anyone recall what I''m referring to? > > > > Bill > > I''ll answer my question. It was Masterview but the site appears to not > be responding. I can see it in google''s cache. > > Bill > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >