Skip to content

Instantly share code, notes, and snippets.

installing postgresql 9.3.2 on ubuntu 12.04

$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 postgresql-contrib-9.3

you should succesfully installing postgresql 9.3.2 on your machine.

@yurifrl
yurifrl / zsh.md
Created July 17, 2014 13:52 — forked from tsabat/zsh.md
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.timestamps
## Database authenticatable
t.string :email, :null => false, :default => ""
t.string :encrypted_password, :null => false, :default => ""
## Recoverable
t.string :reset_password_token
# db/migrate/01_add_custom_admin_roles.rb
class AddCustomAdminRoles < ActiveRecord::Migration
@roles = %w[extra]
def self.up
@roles.each do |r|
Role.create(:name => r)
end
end
<!DOCTYPE html>
<html>
<head>
<title>My Rails App</title>
<%- if protect_against_forgery? -%>
<meta name="authenticity-token" id="authenticity-token" content="<%= form_authenticity_token %>" />
<%- end -%>
<%= javascript_include_tag 'jquery', 'rails' %>
</head>
<body>
As of 8/25/2013, The following steps will create an ecommerce Rails application using the latest stable version of Spree.
1) cd railsprojects
2) rvm use 1.9.3@spree --create
3) gem install rails -v=3.2.14 --no-ri --no-rdoc
4) rails new mystore -d mysql
5) cd mystore
6) Add the following to the Gemfile
gem 'spree', '2.0.4'