Hi Jay,

I installed the haml gem.

Then I added gem 'haml' to the gem file.

Then I ran 'bundle install'

Then I generated a controller for People

Then I changed the extension on the index file in the layout folder in the
views folder to file extension .haml and changed its code to haml

Then rebooted the server

>From that point on, no pages would show up for any page, even the previous
.erb pages.

I just got an error message, something like 'Something is wrong, we will get
back to you.'

I even tried changing the listing in the gem file to gem 'haml-rails' but
that didn't work either.

So not sure what's up. My version of Rails was 3.0.7. So I updated it to
3.0.8, still didn't work.

I've even updated to Rails 3.1 the pre version. Still no luck.

Any idea why haml files are non viewable in my app. My web server is nginx.
Could it be I need to add something to nginx/passenger to interpret .haml
files?

Would love to use haml, but thus far no luck following the standard
instructions. I'm on Ubuntu 10.4 on a Linode account.

Best,
Pardeep.


On 6/8/11 6:39 AM, "Jay Swain" <[email protected]> wrote:

> Add the gem to the gemfile, bundle install...
> 
> naming convention of the views should be: name.html.haml.
> 
> Rails will render templates with a .erb extension before rendering templates
> with the .haml extension. So if you have index.html.erb, and index.html.haml
> exist, be sure to delete the erb file.
> 
> what do you mean "not recognized by the browser" ? missing template error?
> 
> On Jun 8, 2011, at 3:34 AM, Pardeep wrote:
> 
>> Does anyone have any experience with Eurubis or Tenjin vs Haml or Erb
>> in a production environment for ease of dev and speed?
>> 
>> Incidentally I had problems getting Haml working. Installed haml gem
>> and install bundle having included it in the gem file. Was able to
>> generate haml files via the command line, but not recognized in the
>> browser.
>> 
>> Any tips much appreciated.
>> 
>> -- 
>> SD Ruby mailing list
>> [email protected]
>> http://groups.google.com/group/sdruby


-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to