Loos
10 years ago
228 changed files with 26 additions and 4655 deletions
@ -0,0 +1 @@ |
|||||
|
1.5:e13fdd92-def4-4ed7-a167-23d9309061db |
@ -0,0 +1 @@ |
|||||
|
1409951176 |
@ -0,0 +1 @@ |
|||||
|
e13fdd92-def4-4ed7-a167-23d9309061db |
@ -0,0 +1 @@ |
|||||
|
766e9debb0ee447db036220685ccdcd7 |
@ -0,0 +1 @@ |
|||||
|
{"nfs":{"/vagrant":{"type":"nfs","guestpath":"/vagrant","hostpath":"/Users/Thoughtworker/personal-projects/bike-database","disabled":false,"map_uid":502,"map_gid":20,"nfs_udp":true,"nfs_version":3,"uuid":"1546877126"}},"virtualbox":{"/tmp/vagrant-puppet-4/manifests":{"owner":"root","guestpath":"/tmp/vagrant-puppet-4/manifests","hostpath":"/Users/Thoughtworker/personal-projects/bike-database/puppet/manifests","disabled":false},"/tmp/vagrant-puppet-4/modules-0":{"owner":"root","guestpath":"/tmp/vagrant-puppet-4/modules-0","hostpath":"/Users/Thoughtworker/personal-projects/bike-database/puppet/modules","disabled":false}}} |
@ -1,59 +0,0 @@ |
|||||
|
|
||||
* Road blocks and fixes: |
|
||||
|
|
||||
##- When trying to do 'vagrant plugin install vagrant-vbguest' got the follownig nokogiri error. Vagrant v1.6.3 on OSX 10.8.5. |
|
||||
|
|
||||
Installing the 'vagrant-vbguest' plugin. This can take a few minutes... |
|
||||
Building nokogiri using packaged libraries. |
|
||||
Building libxml2-2.8.0 for nokogiri with the following patches applied: |
|
||||
- 0001-Fix-parser-local-buffers-size-problems.patch |
|
||||
... |
|
||||
... |
|
||||
... |
|
||||
Bundler, the underlying system Vagrant uses to install plugins, |
|
||||
reported an error. The error is shown below. These errors are usually |
|
||||
caused by misconfigured plugin installations or transient network |
|
||||
issues. The error from Bundler is: |
|
||||
|
|
||||
An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot continue. |
|
||||
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling. |
|
||||
... |
|
||||
... |
|
||||
|
|
||||
- Workaround |
|
||||
$ export NOKOGIRI_USE_SYSTEM_LIBRARIES=true |
|
||||
$ vagrant plugin install vagrant vagrant-vbguest |
|
||||
$ vagrant plugin list (validate install) |
|
||||
|
|
||||
|
|
||||
##- Executing "rake db:create" you get the following errors |
|
||||
PG::Error: 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 "db/bikedb_development" ENCODING = 'utf8' |
|
||||
|
|
||||
- Solution: follow the instructions here |
|
||||
http://journal.tianhao.info/2010/12/postgresql-change-default-encoding-of-new-databases-to-utf-8-optional/ |
|
||||
|
|
||||
|
|
||||
## UPDATE - 2014.09.03 |
|
||||
Implemented a simple psql script that does the exactly as the url above. Do the following inside guest-OS |
|
||||
|
|
||||
$ vagrant ssh |
|
||||
|
|
||||
$ psql -d postgres -f /vagrant/etc/postgres/enable_utf8_template.sql |
|
||||
$ sudo -u postgres psql postgres |
|
||||
|
|
||||
postgres=# \l |
|
||||
|
|
||||
(The ENCODING should be UTF8 for 'template1' database) |
|
||||
|
|
||||
|
|
||||
Original resources for the Vagrantfile. |
|
||||
http://gorails.com/guides/using-vagrant-for-rails-development |
|
||||
|
|
||||
========================================= |
|
||||
|
|
||||
## TODOs ## |
|
||||
- Add the etc/enable_utf8_template.sql into Vagrant provision routine. One less task to for developer to execute. |
|
||||
- Create developement instructions (README.rdoc?), outlining the commands get the Vagrant/Bike-DB up and running. |
|
||||
|
|
@ -1,36 +0,0 @@ |
|||||
# -*- mode: ruby -*- |
|
||||
# vi: set ft=ruby : |
|
||||
|
|
||||
|
|
||||
Vagrant.configure('2') do |config| |
|
||||
config.vm.box = 'precise32' |
|
||||
config.vm.box_url = 'http://files.vagrantup.com/precise32.box' |
|
||||
config.vm.hostname = 'rails-dev-box' |
|
||||
|
|
||||
config.vm.provider 'vmware_fusion' do |v, override| |
|
||||
override.vm.box = 'precise64' |
|
||||
override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box' |
|
||||
end |
|
||||
|
|
||||
config.vm.provider 'parallels' do |v, override| |
|
||||
override.vm.box = 'parallels/ubuntu-12.04' |
|
||||
override.vm.box_url = 'https://vagrantcloud.com/parallels/ubuntu-12.04' |
|
||||
|
|
||||
# Can be running at background, see https://github.com/Parallels/vagrant-parallels/issues/39 |
|
||||
v.customize ['set', :id, '--on-window-close', 'keep-running'] |
|
||||
end |
|
||||
|
|
||||
# Enable, if you are NOT OSX. |
|
||||
# config.vm.synced_folder '.', '/vagrant', type: 'rsync' |
|
||||
|
|
||||
# Enable ,if you are on OSX for increase performance. NOTE: May require Admin password |
|
||||
config.vm.synced_folder '.', '/vagrant', type: 'nfs' |
|
||||
|
|
||||
config.vm.network :private_network, ip: '33.33.33.33' |
|
||||
config.vm.network :forwarded_port, guest: 3000, host: 3000 |
|
||||
|
|
||||
config.vm.provision :puppet do |puppet| |
|
||||
puppet.manifests_path = 'puppet/manifests' |
|
||||
puppet.module_path = 'puppet/modules' |
|
||||
end |
|
||||
end |
|
@ -0,0 +1,12 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# Your secret key is used for verifying the integrity of signed cookies. |
||||
|
# If you change this key, all old signed cookies will become invalid! |
||||
|
|
||||
|
# Make sure the secret is at least 30 characters and all random, |
||||
|
# no regular words or you'll be exposed to dictionary attacks. |
||||
|
# You can use `rake secret` to generate a secure secret key. |
||||
|
|
||||
|
# Make sure your secret_key_base is kept private |
||||
|
# if you're sharing your code publicly. |
||||
|
Bikedb::Application.config.secret_key_base = '55bed17e71286b1810e75f047637fd1acd64351fcdd5591ab83af67bdc628cb65958d98992a653268015aec9274a2e573b66fb5895d2bf86acd8a5c0e9d35813' |
@ -1,16 +0,0 @@ |
|||||
/* |
|
||||
* Updates the default 'template1' database into UTF-8 instead of SQL_ASCII. |
|
||||
*/ |
|
||||
|
|
||||
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; |
|
||||
|
|
||||
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1'; |
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue