NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| require 'bundler/capistrano' | |
| # This capistrano deployment recipe is made to work with the optional | |
| # StackScript provided to all Rails Rumble teams in their Linode dashboard. | |
| # | |
| # After setting up your Linode with the provided StackScript, configuring | |
| # your Rails app to use your GitHub repository, and copying your deploy | |
| # key from your server's ~/.ssh/github-deploy-key.pub to your GitHub | |
| # repository's Admin / Deploy Keys section, you can configure your Rails | |
| # app to use this deployment recipe by doing the following: |
| set :shared_children, shared_children << 'tmp/sockets' | |
| namespace :deploy do | |
| desc "Start the application" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
| end | |
| desc "Stop the application" | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| - Trailing commas are ok | |
| - No reserved words for property names | |
| - NaN, Infinity, undefined : are all constants | |
| - parseInt() defaults to radix 10 | |
| - /regexp/ produces new reg ex object every time | |
| - JSON.parse(), JSON.stringify() | |
| - Function.prototype.bind | |
| - String.prototype.trim | |
| - Array.prototype.every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some, | |
| - Date.now() |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.
Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.
Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.
| for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done |
| class Group | |
| module Error | |
| class Standard < StandardError; end | |
| class AlreadyAMember < Standard; end | |
| class NotPermittedToJoin < Standard; end | |
| end | |
| def join user | |
| raise Error::NotPermittedToJoin unless self.permitted?(user) | |
| raise Error::AlreadyAMember if self.member?(user) |