osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: [haml] rails generator can't find haml -
msg#00045

List: haml

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

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.

Thread at a glance:

Previous Message by Date:

[haml] rails generator can't find haml

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@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.

Next Message by Date:

[haml] Re: rails generator can't find haml

Yep, that was the problem. I installed <a href="http:// groups.google.com/group/haml/browse_thread/thread/ 969c4775cf71cad1">this</a> and all is well. Thank you. On Feb 18, 6:01 pm, Nathan Weizenbaum <nex...@xxxxxxxxx> wrote: > 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.ko...@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@xxxxxxxxxxxxxxxxx > > To unsubscribe from this group, send email to > > haml+unsubscribe@xxxxxxxxxxxxxxxx <haml%2Bunsubscribe@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.

Previous Message by Thread:

[haml] rails generator can't find haml

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@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.

Next Message by Thread:

[haml] Re: rails generator can't find haml

Yep, that was the problem. I installed <a href="http:// groups.google.com/group/haml/browse_thread/thread/ 969c4775cf71cad1">this</a> and all is well. Thank you. On Feb 18, 6:01 pm, Nathan Weizenbaum <nex...@xxxxxxxxx> wrote: > 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.ko...@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@xxxxxxxxxxxxxxxxx > > To unsubscribe from this group, send email to > > haml+unsubscribe@xxxxxxxxxxxxxxxx <haml%2Bunsubscribe@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.
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!