How can I set up a new option for db:botstrap?

11 views
Skip to first unread message

Anton Aylward

unread,
Sep 4, 2015, 9:15:36 AM9/4/15
to Radiant CMS
When I run

   bundle exec rake production db:bootstrap

I get offered a number of possible initial loadings of the radiant database that include "empty", "blog", "Roasters", "high five"

The YAML templates for these are at

   .....vendor/bundle/ruby/1.9.1/gems/radiant-site_templates-extension-1.0.6/db/templates

They are an 'all in one' file.


I made a dump (?export?) of my old site and would like to load it into the database.
It is under

    db/export

as a hierarchy of files, each being one record

    testradiant> ls -F db/export
    assets/  extension_meta/  page_attachments/  pages/              snippets/                 text_assets/
    config/  layouts/         page_parts/        schema_migrations/  text_asset_dependencies/  users/

and, for example, to drill down

    testradiant> ls -F db/export/layouts/
    1.yml  2.yml  3.yml  4.yml  5.yml  6.yml  7.yml  8.yml

I can see two possibilities.

1. Somehow convert these to another option for the "bootstrap".
    How would I do that?

2. Some other way to load.
    I've googled around and found specifics but none that work for me.

For example

    bundler exec rake db:fixtures:load FIXTURES=layouts,pages

does nothing..
and even thugh I have yasm_db installed

    testradiant> RAILS_ENV=production bundle1.9 exec rake1.9 db:data:load
    NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
    Gem.source_index called from /home/anton/Downloads/testradiant/vendor/bundle/ruby/1.9.1/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21.
    rake aborted!
    Don't know how to build task 'db:data:load'

and

    testradiant> RAILS_ENV=production bundle1.9 exec rake1.9 db:data:load_dir dir='export'
    NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
    Gem.source_index called from /home/anton/Downloads/testradiant/vendor/bundle/ruby/1.9.1/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21.
    rake aborted!
    Don't know how to build task 'db:data:load_dir'

It's as if the Rakefile in yaml_db is being ignored!

So I'm at a loss about how I can get this data loaded.








Reply all
Reply to author
Forward
0 new messages