rails 3 generator does not find 'haml'

1,470 views
Skip to first unread message

nathanvda

unread,
Aug 29, 2010, 9:47:39 AM8/29/10
to Haml
If i type 'rails g controller Posts index'
i get the error

error haml [not found]


Yet i have "gem 'haml'" in my Gemfile, i have installed "gem install
haml" inside my rvm. I recently switched to 1.9.2.
In my application.rb i have added the following:

config.generators do |g|
g.template_engine :haml
end

If i do 'bundle show haml' i get the following:

$ bundle show haml
/home/nathan/.rvm/gems/ruby-1.9.2-p0/gems/haml-3.0.17

So i am a bit at a loss. I seem to be overlooking something blindingly
obvious.
Can anybody help me?

Chris Eppstein

unread,
Aug 29, 2010, 4:19:52 PM8/29/10
to ha...@googlegroups.com
For some reason, Haml does not provide rails 3 generators yet. I think there's some other plugins you can install but I don't know which to recommend.

chris


--
You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.


Nathan Weizenbaum

unread,
Aug 29, 2010, 5:04:26 PM8/29/10
to ha...@googlegroups.com

haml-rails is the most modern Haml integration plugin. It'll be integrated into Haml proper soon.

>> haml+uns...@googlegroups.com <haml%2Bunsu...@googlegroups.com>.

nathanvda

unread,
Aug 29, 2010, 6:15:55 PM8/29/10
to Haml
Thanx. Adding

gem "haml-rails"

to my Gemfile fixed it indeed!

nathanvda

unread,
Aug 30, 2010, 3:54:40 AM8/30/10
to Haml
At work i am using ruby 1.8.7. and i have never installed haml-rails,
and yet this has worked.
In other words: i was able to use the haml generators inside rails3
without installing haml-rails.

Any explanation for that?

nathanvda

unread,
Sep 2, 2010, 9:07:08 AM9/2/10
to Haml
Ok. I found why it worked before: i used rails3-generators the gem,
and the haml part has been extracted to haml-rails.

Reply all
Reply to author
Forward
0 new messages