Rails 3 not loading HAML handler

actionviewhamlruby-on-rails-3

I'm having some problems with Rails 3 and HAML in my application: for some reason Rails appears not to be loading the handler for dealing with haml files. Every action gives an error message similar to this one:


Template is missing

Missing template contact_search/index with {:formats=>[:html], :handlers=>[:rjs, :rhtml, :rxml, :builder, :erb], :locale=>[:en, :en]} in view paths "/var/www/osphonebook/app/views", "/var/www/osphonebook/vendor/bundle/ruby/1.8/gems/devise-1.3.4/app/views"


Look at the "handlers" options: it does not have :haml…

The thing is that this only happens during production mode on the server set up by my company. On development and test modes it works fine. Also, if I start the application in production mode on my development PC, it works.

Some info about the server:

UPDATE (6/6/2011): upgraded to Ruby 1.9, and it still does not work.

ruby 1.9.2p0 (2010-08-18 revision 29036) [i486-linux]

Gems included by the bundle:
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
activesupport (3.0.7)
arel (2.0.10)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bundler (1.0.14)
devise (1.3.4)
erubis (2.6.6)
haml (3.1.1)
i18n (0.5.0)
kgio (2.4.1)
mail (2.2.19)
mime-types (1.16)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.7)
railties (3.0.7)
rake (0.8.7)
sass (3.1.2)
sqlite3 (1.3.3)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
unicorn (3.6.2)
warden (1.0.4)

If more info is needed, please comment the question, and I'll update it. Thanks for any help.

Best Answer

Try with the gem haml-rails

Related Topic