Skip to content

Instantly share code, notes, and snippets.

@saroar
Created February 24, 2015 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saroar/7e6a2f987d056ba7a9d5 to your computer and use it in GitHub Desktop.
Save saroar/7e6a2f987d056ba7a9d5 to your computer and use it in GitHub Desktop.
mina deploy would u like to check please thanks advance
this is my deploy.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
require 'mina_sidekiq/tasks'
require 'mina/unicorn'
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
# branch - Branch name to deploy. (needed by mina/git)
set :domain, 'my_ip_adress'
set :deploy_to, '/home/sumon/amra/'
set :repository, 'https://github.com/saroar/stud2do.git'
set :branch, 'master'
set :user, 'my_user'
set :forward_agent, true
set :port, 'my_port'
set :unicorn_pid, "#{deploy_to}/shared/pids/unicorn.pid"
# For system-wide RVM install.
# set :rvm_path, '/usr/local/rvm/bin/rvm'
# Manually create these paths in shared/ (eg: shared/config/database.yml) in your server.
# They will be linked in the 'deploy:link_shared_paths' step.
set :shared_paths, ['config/database.yml', 'log']
# Optional settings:
# set :user, 'foobar' # Username in the server to SSH to.
# set :port, '30000' # SSH port number.
# set :forward_agent, true # SSH forward_agent.
# This task is the environment that is loaded for most commands, such as
# `mina deploy` or `mina rake`.
task :environment do
# If you're using rbenv, use this to load the rbenv environment.
# Be sure to commit your .ruby-version or .rbenv-version to your repository.
# invoke :'rbenv:load'
# For those using RVM, use this to load an RVM version@gemset.
# invoke :'rvm:use[ruby-1.9.3-p125@default]'
end
# Put any custom mkdir's in here for when `mina setup` is ran.
# For Rails apps, we'll make some of the shared paths that are shared between
# all releases.
task :setup => :environment do
queue! %[mkdir -p "#{deploy_to}/#{shared_path}/log"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/#{shared_path}/log"]
queue! %[mkdir -p "#{deploy_to}/#{shared_path}/config"]
queue! %[chmod g+rx,u+rwx "#{deploy_to}/#{shared_path}/config"]
queue! %[touch "#{deploy_to}/#{shared_path}/config/database.yml"]
queue %[echo "-----> Be sure to edit '#{deploy_to}/#{shared_path}/config/database.yml'."]
end
desc "Deploys the current version to the server."
task :deploy => :environment do
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 :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
to :launch do
queue "mkdir -p #{deploy_to}/#{current_path}/tmp/"
queue "touch #{deploy_to}/#{current_path}/tmp/restart.txt"
end
end
end
# For help in making your deploy script, see the Mina documentation:
#
# - http://nadarei.co/mina
# - http://nadarei.co/mina/tasks
# - http://nadarei.co/mina/settings
# - http://nadarei.co/mina/helpers
this is error
-----> Creating a temporary build path
-----> Fetching new git commits
-----> Using git branch 'master'
Cloning into '.'...
done.
-----> Using this git commit
Saroar (16777b9):
> first commit
-----> Symlinking shared paths
-----> Installing gem dependencies using Bundler
bash: line 79: bundle: command not found
! ERROR: Deploy failed.
-----> Cleaning up build
Unlinking current
OK
! Command failed.
Failed with status 19
@jmccartie
Copy link

bundle is not installed on the server.

Try SSHing onto the server and running gem install bundler

@saroar
Copy link
Author

saroar commented Feb 24, 2015

i did already

@saroar
Copy link
Author

saroar commented Feb 24, 2015

:~$ gem install bundler
Successfully installed bundler-1.8.2
1 gem installed

@saroar
Copy link
Author

saroar commented Feb 24, 2015

but same error :(

@saroar
Copy link
Author

saroar commented Feb 24, 2015

-----> Migrating database
rake aborted!
PG::ConnectionBad: FATAL: Peer authentication failed for user "admin" new problem :(

@saroar
Copy link
Author

saroar commented Feb 24, 2015

   rake aborted!
   PG::ConnectionBad: FATAL:  Peer authentication failed for user "tutul"

@saroar
Copy link
Author

saroar commented Feb 25, 2015

solve this problem by this
sudo nano pg_hba.conf
and replace

local all postgres peer

to

local all postgres md5

@saroar
Copy link
Author

saroar commented Feb 25, 2015

still i see my

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

how i will see my website amra.me site :(

but i remember i add there my ip address should i put my domain name here ?

set :domain, 'my_ip_adress' to set :domain, 'amra.me'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment