bmalets
bmalets

Reputation: 3297

zurb_foundation layout generation in rails

I use gem 'zurb-foundation', '~> 4.0.0' and gem 'rails', '3.2.13'

After 'bundle install', I try to generate standart foundation layout templates ( 'rails g foundation:layout' ), I see 'Could not find generator foundation:layout.'

This is 'rails generate --help' output:



    Usage: rails generate GENERATOR [args] [options]

    General options:
      -h, [--help]     # Print generator's options and usage
      -p, [--pretend]  # Run but do not make any changes
      -f, [--force]    # Overwrite files that already exist
      -s, [--skip]     # Skip files that already exist
      -q, [--quiet]    # Suppress status output

    Please choose a generator below.

    Rails:
      assets
      controller
      generator
      helper
      integration_test
      mailer
      migration
      model
      observer
      performance_test
      resource
      scaffold
      scaffold_controller
      session_migration
      task

    Coffee:
      coffee:assets

    Foundation:
      foundation:install

    Jquery:
      jquery:install

    Js:
      js:assets

Whe I run 'rails g foundation:install', I have:



          insert  app/assets/javascripts/application.js
          append  app/assets/javascripts/application.js
        conflict  app/assets/stylesheets/foundation_and_overrides.scss
    Overwrite /Users/bmalets/Documents/ror_projects/easyprint/app/assets/stylesheets/foundation_and_overrides.scss? (enter "h" for help) [Ynaqdh] Yes
           force  app/assets/stylesheets/foundation_and_overrides.scss
          append  app/assets/stylesheets/foundation_and_overrides.scss
          append  app/assets/stylesheets/application.css
        conflict  app/views/layouts/application.html.erb
    Overwrite /Users/bmalets/Documents/ror_projects/easyprint/app/views/layouts/application.html.erb? (enter "h" for help) [Ynaqdh] Yes
           force  app/views/layouts/application.html.erb

After I have empty application layout without vertical_menu template. I have views with foundation style without top menu ( only application.html.erb in app/view/layouts/ ). What is the problem? Why zurb/foundation generators that are not loaded?

Upvotes: 0

Views: 1011

Answers (1)

Kvzb
Kvzb

Reputation: 61

As of Foundation 4, the layout generation is included in the foundation:install generator, which, in your case, is actually available. Just run :

rails g foundation:install

You might also take a peek at the actual source code of the generator to see exactly what it does.

Upvotes: 2

Related Questions