I'm not sure that Haml generators are included with Rails 3 by default. This might be your problem.
On Thu, Feb 18, 2010 at 3:21 PM, mori <
mori.kopel@xxxxxxxxx> wrote:
In a new Rails 3 app I am having trouble getting the controller
generator to use haml. When I run:
rails g controller home index -p
I get:
create app/controllers/home_controller.rb
error haml [not found]
invoke rspec ...
...
I did this:
* installed the latest version of the haml gem, v2.2.20
* added gem "haml" to Gemfile
* ran bundle install
* ran haml --rails <my_rails_app_dir>. This successfully
installed ./vendor/plugins/haml/init.rb.
* added to application.rb:
config.generators do |g|
g.template_engine :haml
end
I also tried Jacques Crocker's suggestion, no joy:
config/initializers/haml.rb:
Haml.init_rails(binding) if defined?(Haml)
I'm a noob, so I probably just did something simple wrong, but any
suggestions are appreciated.
Thanks...
--
You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to
haml@xxxxxxxxxxxxxxxx.
To unsubscribe from this group, send email to
haml+unsubscribe@xxxxxxxxxxxxxxxx.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to haml@xxxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to haml+unsubscribe@xxxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/haml?hl=en.