Gemfile:
# an HTTP server for Rack applications
# http://unicorn.bogomips.org/
gem 'unicorn', '~> 4.8.3'
gem 'capistrano-unicorn', :require => false, group: :development
add new file config/unicorn.rb
Gemfile:
# an HTTP server for Rack applications
# http://unicorn.bogomips.org/
gem 'unicorn', '~> 4.8.3'
gem 'capistrano-unicorn', :require => false, group: :development
add new file config/unicorn.rb
| namespace :figaro do | |
| desc "SCP transfer figaro configuration to the shared folder" | |
| task :setup do | |
| transfer :up, "config/application.yml", "#{shared_path}/application.yml", :via => :scp | |
| end | |
| desc "Symlink application.yml to the release path" | |
| task :finalize do | |
| run "ln -sf #{shared_path}/application.yml #{release_path}/config/application.yml" | |
| end |
遇到 incomplete response received from application
可能是 config/secret.yml 没有配置好.
e.g config/secret.yml 的 production secret key 没有配置好
$ sudo dpkg-reconfigure tzdata
rake aborted!
/home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/trace_output.rb:16:in `block in trace_on': invalid byte sequence in US-ASCII (ArgumentError)If you got this error
checkout your your custom initializers, your database.yml, etc
add
| /* | |
| HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed | |
| */ | |
| (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); | |
| a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsBy |
Perpare:
$ sudo apt-get install git
$ sudo apt-get install curl
Install zsh:
$ sudo apt-get install zsh
touch a file call config in your ~/.ssh folder, edit like below
Host myserver
HostName 104.216.186.124
User deployer
Port 22
Make sure you have the right permissions
$ chmod 600 ~/.ssh/config