Skip to content

Instantly share code, notes, and snippets.

@rollick
rollick / PG::Error: ERROR: new encoding (UTF8) is incompatible
Created September 15, 2016 11:59 — forked from amolkhanorkar/PG::Error: ERROR: new encoding (UTF8) is incompatible
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
#!/bin/bash
SAUCE_TMP_DIR="$(mktemp -d)"
cd $SAUCE_TMP_DIR
SC_ZIP=Sauce-Connect-latest.zip
SC_READYFILE=sauce-connect-ready
SC_LOGFILE=$HOME/sauce-connect.log
echo "Downloading Sauce Connect"
.bar {fill: #1D8300;}
.label {fill: #FFF; font-size:10px; font-family:sans-serif;}
fieldset {margin-bottom:20px}
Gem::Specification.new do |s|
s.name = "feature_tour_repository"
s.version = "0.8.1"
s.platform = "ruby"
s.authors = ["Glenn Tweedie", "Mark Gallop", "Agworld"]
s.email = ["glenn.tweedie@agworld.com.au"]
s.homepage = "http://agworld.com.au"
s.summary = "Le Tour d'Agworld"
s.description = "Feature Tour Repository"
s.required_rubygems_version = ">= 1.3.6"
@rollick
rollick / po2json.js
Created May 10, 2012 14:54 — forked from zaach/po2json.js
PO parser from http://jsgettext.berlios.de/lib/Gettext.js adapted for Node.js and modified to be more like po2json.pl
#!/usr/bin/env node
/*
PO parser from http://jsgettext.berlios.de/lib/Gettext.js
adapted for Node.js and modified to be more like po2json.pl
- Zach Carter <zcarter@cse.usf.edu>
*/
/*
Pure Javascript implementation of Uniforum message translation.
module PaperclipMigrations
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def add_paperclip_fields(table, prefix)
add_column table, "#{prefix}_file_name", :string
add_column table, "#{prefix}_content_type", :string