In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
/* -------------------------------------------------------------------------------------- */ | |
/* BASIC SETUP */ | |
/* -------------------------------------------------------------------------------------- */ | |
* { | |
/* default css reset */ | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} |
/* From big tablets to 1200px (widths smaller then the 1140px row) */ | |
@media only screen and (max-width: 1200px) { | |
.row { | |
padding: 0 2%; | |
} | |
section { | |
padding-top: 2%; | |
} | |
} |
default: &default | |
adapter: postgresql | |
pool: 5 | |
timeout: 5000 | |
host: localhost | |
username: vagrant | |
password: vagrant | |
development: | |
<<: *default |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "10.2.2.2" | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
config.vm.network :forwarded_port, guest: 5432, host: 5432 |
======= 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' |
At time of writing, Cloud9 has PostgreSQL pre-installed, so you won't need to install it yourself. However, its not running by default, so you will need to start it with this command in the terminal:
sudo service postgresql start
Change the PostgreSQL password to 'password' (or choose a different password):
sudo -u postgres psql | |
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE'; | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
\c template1 | |
VACUUM FREEZE; | |
sudo /etc/init.d/postgresql restart |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "10.2.2.2" | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
config.vm.network :forwarded_port, guest: 5432, host: 5432 |