mina-deploy / mina

Blazing fast deployer and server automation tool
https://rubygems.org/gems/mina
Other
4.35k stars 491 forks source link

Don't know how to build task 'rake:db_migrate' #536

Closed wonderer007 closed 6 years ago

wonderer007 commented 7 years ago

I am getting following error

Don't know how to build task 'rake:db_migrate'

and my deploy.rb look like this

desc "Deploys the current version to the server."
task :deploy do
  # uncomment this line to make sure you pushed your local branch to the remote origin
  # invoke :'git:ensure_pushed'
  deploy do
    # Put things that will set up an empty directory into a fully set-up
    # instance of your project.
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'
    invoke :'rake:db_migrate'
    invoke :'rake:assets_precompile'
    invoke :'deploy:cleanup'

    on :launch do
      invoke :'puma:phased_restart' 
    end

  end

  # you can use `run :local` to run tasks on local machine before of after the deploy scripts
  # run :local { say 'done' }
end

The root cause of the error is this line invoke :'rake:db_migrate'

Any suggestion please Thanks

adam12 commented 7 years ago

Presuming you're requiring mina/rails somewhere in your deploy.rb file before invoking these tasks, the correct names for them are rails:db_migrate and rails:assets_precompile.

d4be4st commented 6 years ago

there is no rake:db_migrate mina task

there is rails:db_migrate and rails:assets_precompile