I am a Ruby on Rails newbie and am trying to use Haml. I love the
different aspects of and would love to use it for everything. One
simple problem which I can't seem to find the answer to. How does it
get compiled?
I have haml files in a Ruby on Rails project in Aptana and I made the
assumption that when you start the server, the files are compiled to
html, but I think I am incorrect in that assumption. I have yet to see
a compiled haml file in a browser. I know this is probably super
simple, but if someone could please tell me what to do I would greatly
appreciate it.
If you're using Haml with Rails, it'll work just like ERB (once you have the
plugin installed, that is): you write your views with the extension
".html.haml" and then when you go to view them in your browser, it's
automatically compiled behind-the-scenes.
Does that help?
On Sat, Nov 7, 2009 at 2:17 PM, webbieguy <justin.dean.griff...@gmail.com>wrote:
> I am a Ruby on Rails newbie and am trying to use Haml. I love the
> different aspects of and would love to use it for everything. One
> simple problem which I can't seem to find the answer to. How does it
> get compiled?
> I have haml files in a Ruby on Rails project in Aptana and I made the
> assumption that when you start the server, the files are compiled to
> html, but I think I am incorrect in that assumption. I have yet to see
> a compiled haml file in a browser. I know this is probably super
> simple, but if someone could please tell me what to do I would greatly
> appreciate it.
> If you're using Haml with Rails, it'll work just like ERB (once you have the
> plugin installed, that is): you write your views with the extension
> ".html.haml" and then when you go to view them in your browser, it's
> automatically compiled behind-the-scenes.
> Does that help?
> On Sat, Nov 7, 2009 at 2:17 PM, webbieguy <justin.dean.griff...@gmail.com>wrote:
> > Hi,
> > I am a Ruby on Rails newbie and am trying to use Haml. I love the
> > different aspects of and would love to use it for everything. One
> > simple problem which I can't seem to find the answer to. How does it
> > get compiled?
> > I have haml files in a Ruby on Rails project in Aptana and I made the
> > assumption that when you start the server, the files are compiled to
> > html, but I think I am incorrect in that assumption. I have yet to see
> > a compiled haml file in a browser. I know this is probably super
> > simple, but if someone could please tell me what to do I would greatly
> > appreciate it.
> If you're using Haml with Rails, it'll work just like ERB (once you have the
> plugin installed, that is): you write your views with the extension
> ".html.haml" and then when you go to view them in your browser, it's
> automatically compiled behind-the-scenes.
> Does that help?
> On Sat, Nov 7, 2009 at 2:17 PM, webbieguy <justin.dean.griff...@gmail.com>wrote:
> > Hi,
> > I am a Ruby on Rails newbie and am trying to use Haml. I love the
> > different aspects of and would love to use it for everything. One
> > simple problem which I can't seem to find the answer to. How does it
> > get compiled?
> > I have haml files in a Ruby on Rails project in Aptana and I made the
> > assumption that when you start the server, the files are compiled to
> > html, but I think I am incorrect in that assumption. I have yet to see
> > a compiled haml file in a browser. I know this is probably super
> > simple, but if someone could please tell me what to do I would greatly
> > appreciate it.
> I forgot to say that I am using haml_scaffold to generate my haml
> files.
> On Nov 7, 5:13 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> > If you're using Haml with Rails, it'll work just like ERB (once you have
> the
> > plugin installed, that is): you write your views with the extension
> > ".html.haml" and then when you go to view them in your browser, it's
> > automatically compiled behind-the-scenes.
> > Does that help?
> > On Sat, Nov 7, 2009 at 2:17 PM, webbieguy <
> justin.dean.griff...@gmail.com>wrote:
> > > Hi,
> > > I am a Ruby on Rails newbie and am trying to use Haml. I love the
> > > different aspects of and would love to use it for everything. One
> > > simple problem which I can't seem to find the answer to. How does it
> > > get compiled?
> > > I have haml files in a Ruby on Rails project in Aptana and I made the
> > > assumption that when you start the server, the files are compiled to
> > > html, but I think I am incorrect in that assumption. I have yet to see
> > > a compiled haml file in a browser. I know this is probably super
> > > simple, but if someone could please tell me what to do I would greatly
> > > appreciate it.
I am guessing you that you haven't set up will_paginate? Haml_scaffold
by default adds code that depends on will_paginate, but doesn't
install the gem nor does it configure it in environment.rb.
So make sure you have a line like
gem "will_paginage"
in your environment.rb, and it should work "out of the box."
On Sun, Nov 8, 2009 at 5:12 PM, Nathan Weizenbaum <nex...@gmail.com> wrote:
> I'm not sure what you mean by a "pagination error".
> On Sat, Nov 7, 2009 at 8:24 PM, webbieguy <justin.dean.griff...@gmail.com>
> wrote:
>> I forgot to say that I am using haml_scaffold to generate my haml
>> files.
>> On Nov 7, 5:13 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
>> > If you're using Haml with Rails, it'll work just like ERB (once you have
>> > the
>> > plugin installed, that is): you write your views with the extension
>> > ".html.haml" and then when you go to view them in your browser, it's
>> > automatically compiled behind-the-scenes.
>> > Does that help?
>> > On Sat, Nov 7, 2009 at 2:17 PM, webbieguy
>> > <justin.dean.griff...@gmail.com>wrote:
>> > > Hi,
>> > > I am a Ruby on Rails newbie and am trying to use Haml. I love the
>> > > different aspects of and would love to use it for everything. One
>> > > simple problem which I can't seem to find the answer to. How does it
>> > > get compiled?
>> > > I have haml files in a Ruby on Rails project in Aptana and I made the
>> > > assumption that when you start the server, the files are compiled to
>> > > html, but I think I am incorrect in that assumption. I have yet to see
>> > > a compiled haml file in a browser. I know this is probably super
>> > > simple, but if someone could please tell me what to do I would greatly
>> > > appreciate it.