Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
set :rails_env, :production | |
set :unicorn_binary, "/usr/bin/unicorn" | |
# NOTICE: 不可在此外部使用 current_path,否则将会使用固定此文件下的 deploy_to 或默认的 deploy_to | |
# set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
# set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
namespace :deploy do | |
task :start, :roles => :app, :except => { :no_release => true } do | |
unicorn_config = "#{current_path}/config/unicorn.rb" | |
unicorn_pid = "#{current_path}/tmp/pids/unicorn.pid" |
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript | |
powered JS and SASS powered CSS with YUI compression all via the magic of rack. | |
This stuff will be native in Rails 3.1 and the layout of the files on the | |
filesystem will be different but this guide will get you working with it | |
while we wait for all that to finalize. | |
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist. | |
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention |
# 在服务器的nginx上添加配置 | |
upstream tunnel { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name dev.example.com; | |
location / { |