@ywencn 记错了吗?忘记了,哈哈,因为我用了没几天,就升级到 3.0 了,然后一出新的就升级
@poshboytl 因为 DHH 本人的 15 分钟 blog screencast.... 就深深爱上无法自拔.... 当时版本应该是 2.9。
@linjunhalida app 是自己写的,用 coffeescript,其他都是插件了
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require autocomplete-rails
//= require jquery.form
//= require jquery.remotipart
//= require jquery.autogrow-textarea
//= require jquery.caret
//= require rails.validations
//= require bootstrap.min
//= require app
deploy.rb
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :user, "stephen"
set :runner, "apps"
set :group, "apps"
set :application, "blog"
set :rvm_ruby_string, "ruby-1.9.2-p290@global"
set :rvm_path, "/home/stephen/.rvm"
set :rvm_bin_path, "/home/stephen/.rvm/bin"
set :rvm_trust_rvmrcs_flag, 1
set :normalize_asset_timestamps, false
set :scm, :git
set :domain, "vm-192-168-11-11.shengyun.grandcloud.cn"
set :repository, "git://github.com/85636682/blog.git"
set :branch, "master"
set :deploy_to, "/home/apps/#{application}"
set :deploy_via, :remote_cache
set :git_shallow_clone, 1
set :deploy_env, "production"
set :rails_env, "production"
set :scm_verbose, true
set :use_sudo, false
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
namespace :deploy do
task :init_shared_path, :roles => :web do
run "mkdir -p #{deploy_to}/shared/log"
run "mkdir -p #{deploy_to}/shared/pids"
run "mkdir -p #{deploy_to}/shared/assets"
end
task :link_shared_files, :roles => :web do
run "ln -sf #{deploy_to}/shared/config/database.yml #{deploy_to}/current/config/database.yml"
run "ln -s #{deploy_to}/shared/assets #{deploy_to}/current/public/assets"
end
task :install_gems, :roles => :web do
run "cd #{deploy_to}/current/; bundle install --without development test"
end
task :compile_assets, :roles => :web do
run "cd #{deploy_to}/current/; bundle exec rake assets:precompile"
end
end
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
# namespace :deploy do
# task :start do ; end
# task :stop do ; end
# task :restart, :roles => :app, :except => { :no_release => true } do
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
# end
# end
@bluebu 你有 rails 下实际运用的示例么?看到点点网用得还 OK!