Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
u007 opened this issue Dec 5, 2016 · 10 comments
Closed

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

u007 opened this issue Dec 5, 2016 · 10 comments

Comments

@u007
Copy link

u007 commented Dec 5, 2016

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

rails 5, gemfile already added mina

@lokyoung
Copy link

lokyoung commented Dec 7, 2016

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

@u007
Copy link
Author

u007 commented Dec 7, 2016

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

@u007
Copy link
Author

u007 commented Dec 8, 2016

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
Copy link

lokyoung commented Dec 9, 2016

@u007 Which version of mina are you using?

@u007
Copy link
Author

u007 commented Dec 9, 2016

1.0.3

@lokyoung
Copy link

lokyoung commented Dec 9, 2016

@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
Copy link
Member

d4be4st commented Dec 13, 2016

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

You might have multiple mina installed on your system

@u007
Copy link
Author

u007 commented Dec 15, 2016

bundle exec mina init

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

@d4be4st
Copy link
Member

d4be4st commented Dec 15, 2016

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

I have fixed this in ddf823c

but what does your bundle exec mina setup say?

@d4be4st
Copy link
Member

d4be4st commented Sep 29, 2017

Closing issue

@d4be4st d4be4st closed this as completed Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants