mina-deploy / mina

Blazing fast deployer and server automation tool

Home Page:https://rubygems.org/gems/mina

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mina deploy Could not locate Gemfile

marlborox opened this issue · comments

I run mina deploy, but i get this error. How can i setting,please?

Could not locate Gemfile
!ERROR: Deploy failed.

I guess about set :repository, ssh://git@github.com/lalala/rungo.git
github rungo folder below two project, repository setting in here.

  • rungo/rungo -> this project have Gemfile
  • rungo/testing

I think copy Gemfile to rungo/Gemfile is good, but i hope rungo below not Gemfile.

i need to see your deploy.rb file as i can not see the problem for issue alone

Thank you for your reply. This is my deploy.rb.

require 'mina/multistage'
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
require 'mina/nginx'
require 'mina/unicorn'

set :branch, :master
set :deploy_to, '/home/lalala/rungo/rungo'
set :rails_env, 'staging'
set :domain, '1.1.1.1'
set :server, 'staging'

set :user, 'lalala'
set :repository, ', ssh://git@github.com/lalala/rungo.git'
set :project_path, '/home/lalala/rungo'
set :current_path, '/home/lalala/rungo/rungo/current'
set :shared_dirs, ['log', 'public', 'tmp/sockets', 'tmp/pids']
set :shared_paths, [ 'config/secrets.yml', 'config/database.yml', 'config/settings.yml', 'config/unicorn.rb']

set :keep_releases, 5

desc 'Set up environment.'
task :environment do
invoke :'rbenv:load'
end

desc 'Prepare for deployment.'
task :setup do
['log', 'config', 'tmp/pids', 'tmp/sockets', 'public'].each do |dir|
command %{mkdir -p "#{fetch(:deploy_to)}/shared/#{dir}"}
command %{chmod g+rx,u+rwx "#{fetch(:deploy_to)}/shared/#{dir}"}
end

['config/database.yml', 'config/secrets.yml', "config/settings.yml", "config/unicorn.rb"].each do |file|
command %{touch "#{fetch(:deploy_to)}/shared/#{file}"}
comment %{Be sure to edit 'shared/#{file}'.}
end

end

You have unconventional git setup.
Usually Gemfile is located in the root of a project path

you would have to override https://github.com/mina-deploy/mina/blob/master/data/deploy.sh.erb and create your own...
Basically everywhere where you have fetch(:current_path) put fetch(:current_path)/rungo, except on line https://github.com/mina-deploy/mina/blob/master/data/deploy.sh.erb#L78

But i would suggest creating a new repo without extra folders in the root dir :)