comfy / comfy-demo

A simple Rails app with CMS installed
19 stars 7 forks source link

Importing seeds #3

Open pablof300 opened 5 years ago

pablof300 commented 5 years ago

When trying to import a CMS seed, using:

rake 'comfy:cms_seeds:import[sample-site, demo]'

the following stack trace follows:

Importing CMS Seed data from Folder [sample-site] to Site [demo] ...
rake aborted!
NoMethodError: undefined method `each' for nil:NilClass
.rvm/gems/ruby-2.5.1/gems/comfortable_mexican_sofa-2.0.18/lib/comfortable_mexican_sofa/seeds.rb:32:in `import!'
/.rvm/gems/ruby-2.5.1/gems/comfortable_mexican_sofa-2.0.18/lib/tasks/cms_seeds.rake:18:in `block (3 levels) in <main>'
/.rvm/gems/ruby-2.5.1/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
lhjd commented 4 years ago

I use the following steps and I was able to seed the cms:

  1. git clone https://github.com/comfy/comfy-demo.git
  2. cd comfy-demo
  3. bundle
  4. yarn
  5. rails db:migrate
  6. rails server
  7. go to http://localhost:3000/admin/
  8. create a new site with identifier set to demo Screenshot 2020-02-28 at 3 45 35 PM
    1. rake 'comfy:cms_seeds:import[sample-site, demo]' Screenshot 2020-02-28 at 3 47 17 PM