mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Agregar estas líneas al archivo ~/.vimrc
execute pathogen#infect()
set nocompatible
mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Agregar estas líneas al archivo ~/.vimrc
execute pathogen#infect()
set nocompatible
Instalación del entorno de Ruby en Ubuntu 13.10 | |
Instalación de Ruby de acuerdo a http://rvm.io: | |
``` | |
\curl -sSL https://get.rvm.io | bash -s stable | |
``` | |
En las preferencias de la consola de gnome, agregar que cuando se active la consola sea como login (conexión) y se abre una nueva terminal. |
check process unicorn-<<aplicacion>> | |
with pidfile /home/deployer/apps/<<aplicacion>>/current/tmp/pids/unicorn.pid | |
start program = "/etc/init.d/unicorn_blog start" | |
stop program = "/etc/init.d/unicorn_blog stop" | |
restart program = "/etc/init.d/unicorn_blog stop && /etc/init.d/unicorn_blog start" | |
group unicorn-blog | |
check file blog-restart with path /home/deployer/apps/<<aplicacion>>/current/tmp/restart.txt | |
if changed timestamp | |
then exec "/usr/bin/monit -g unicorn-blog restart" |
set :application, 'prueba' | |
set :scm, "git" | |
set :repo_url, "[email protected]:LogicalBricks/prueba.git" | |
set :deploy_to, "/home/deployer/apps/#{fetch(:application)}" | |
set :ssh_options, { | |
forward_agent: true | |
} | |
set :log_level, :debug |
set :stage, :production | |
role :app, %w{[email protected]} | |
role :web, %w{[email protected]} | |
role :db, %w{[email protected]} | |
server '162.243.71.34', user: 'deployer', roles: %w{web app db} | |
set :branch, ENV["REVISION"] || ENV["BRANCH_NAME"] || "master" |
set :stage, :staging | |
set :rails_env, 'production' | |
set :deploy_to, "/home/deployerdemo/apps/#{fetch(:application)}" | |
role :app, %w{[email protected]} | |
role :web, %w{[email protected]} | |
role :db, %w{[email protected]} | |
server '162.243.105.100', user: 'deployerdemo', roles: %w{web app db} |
upstream unicorn { | |
server unix:/tmp/unicorn.<<aplicacion>>.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default deferred; | |
# server_name example.com; | |
root /home/deployer/apps/<<aplicacion>>/current/public; | |
location ^~ /assets/ { |
root = "/home/deployer/apps/<<aplicacion>>/current" | |
working_directory root | |
pid "#{root}/tmp/pids/unicorn.pid" | |
stderr_path "#{root}/log/unicorn.log" | |
stdout_path "#{root}/log/unicorn.log" | |
listen "/tmp/unicorn.<<aplicacion>>.sock" | |
worker_processes 2 | |
timeout 30 |
#!/bin/sh | |
set -e | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/home/deployer/apps/<<aplicacion>>/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" | |
AS_USER=deployer | |
set -u |
$ cd ~/.rbenv/plugins/ruby-build/ | |
$ git pull | |
$ cd .rbenv | |
$ git pull | |
$ rbenv install <ruby-version> |