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 deploy Could not locate Gemfile #552

Closed
marlborox opened this issue Jul 30, 2017 · 3 comments
Closed

mina deploy Could not locate Gemfile #552

marlborox opened this issue Jul 30, 2017 · 3 comments

Comments

@marlborox
Copy link

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://[email protected]/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.

@marlborox marlborox changed the title mina deploy mina deploy Could not locate Gemfile Jul 30, 2017
@d4be4st
Copy link
Member

d4be4st commented Sep 8, 2017

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

@marlborox
Copy link
Author

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://[email protected]/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

@d4be4st
Copy link
Member

d4be4st commented Sep 22, 2017

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 :)

@d4be4st d4be4st closed this as completed Jan 26, 2018
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

2 participants