0

I am trying to implement the following rake task from the CMS wiki

namespace :test do
  task :prepare do
    ENV['FROM'] = 'folder-name'
    ENV['TO']   = 'site-identifier'
    Rake::Task['comfortable_mexican_sofa:fixtures:import'].invoke
  end
end

I created test.rake with the above contents and put it in lib/tasks/

$ bundle exec rake:test

gives me: bundler: command not found: rake:test.
My search for documentation leads me to explainations of: RSpec::Core::RakeTask. I assume these are different things. My question is: How do I execute the above rake task? Any help would be greatly appreciated.

laertiades
  • 1,992
  • 2
  • 19
  • 26

1 Answers1

1

Your command is trying to run rake:test, which isn't a known command. You can see this by doing which rake:test.

I think you meant

bundle exec rake test

You can also do

bundle exec rake -T

To see the list of available tasks that have documentation.

For further reference on bundle exec see the bundler documentation.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366