Skip to content

Instantly share code, notes, and snippets.

@vijaydev
vijaydev / gist:755496
Created December 26, 2010 16:18 — forked from lifo/gist:31208
An Example Rails 3 Application Template
run "rm public/index.html"
generate(:scaffold, "item name:string")
route "root :to => 'items#index'"
rake("db:migrate", "production")
gem 'ruby-openid'
gem 'will-paginate', :git => 'git://github.com/mislav/will_paginate.git'
add_source "http://code.whytheluckystiff.net"
gem "hpricot", :version => '0.6'
@vijaydev
vijaydev / gist:2170020
Created March 23, 2012 11:59 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session