mina-deploy / mina

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

mina setup or mina init, don't know how to build task #488

Closed u007 closed 6 years ago

u007 commented 7 years ago

mina setup mina init both returns: Don't know how to build task 'deploy' (see --tasks)

rails 5, gemfile already added mina

lokyoung commented 7 years ago

@u007 Could you please paste your deploy.rb file here?

u007 commented 7 years ago

pls hold on, i didnt have access to my pc 2nite, will try tomorrow night thank you

u007 commented 7 years ago
require 'mina/bundler' 
require 'mina/rails' 
require 'mina/git' 
require 'mina/rvm'

# mina
set :user, 'myuser'
set :domain, 'xyz.com'
set :deploy_to, '/home/appz/rails/production'

set :repository, 'git@bitbucket.org:xxx/appz.git'
set :branch, 'main'
task :environment do

  # invoke :'rbenv:load'
  invoke :'rvm:use[ruby-2.3.1-p112@default]'

end

set :format, :pretty
set :rvm_ruby_version, '2.3.1'

# Default value for :log_level is :debug
set :log_level, :debug
set :bundle_path, -> { release_path.join('vendor').join('bundle') }

set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle
    public/system public/uploads}

set :bundle_without, %w{development test james}.join(' ') 
# Default value for keep_releases is 5
set :keep_releases, 3
set :ssh_options, :compression => false, :keepalive => true

set :delayed_job_server_role, :worker
set :delayed_job_args, "-n 2"
lokyoung commented 7 years ago

@u007 Which version of mina are you using?

u007 commented 7 years ago

1.0.3

lokyoung commented 7 years ago

@u007 Please follow the migrating guide https://github.com/mina-deploy/mina/blob/master/docs/migrating.md. There are some syntax in your deploy.rb which are unsupported in mina 1.0.3. e.g. invoke :'rvm:use[ruby-2.3.1-p112@default]' should be invoke :'rvm:use', 'ruby-2.3.1-p112@default'.

d4be4st commented 7 years ago

Also have you tried running with : bundle exec mina init ?

You might have multiple mina installed on your system

u007 commented 7 years ago
bundle exec mina init

mina aborted! Don't know how to build task 'init'

d4be4st commented 7 years ago

You can not execute init if your project is already initialized.

I have fixed this in https://github.com/mina-deploy/mina/commit/ddf823cca7c21c16e5f6ea5e566037dba19f6e92

but what does your bundle exec mina setup say?

d4be4st commented 6 years ago

Closing issue