connect to postgres
psql -h localhost
create database
CREATE DATABASE mydatabase;
switch to your database
\connect mydatabase
add postgis extension
| #!/usr/bin/env ruby | |
| country_array = %w( | |
| aruba | |
| afghanistan | |
| andorra | |
| angola | |
| anguilla | |
| albania | |
| united-arab-emirates |
connect to postgres
psql -h localhost
create database
CREATE DATABASE mydatabase;
switch to your database
\connect mydatabase
add postgis extension
To dump:
pg_dump dbname > dbname.sql
To restore:
cat dbname.sql | psql dbname
NOTICE:
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |
| module DummyImageHelper | |
| def dummy_image wxh | |
| image_tag "http://dummyimage.com/#{wxh}/999/eee.png",size: wxh | |
| end | |
| end |
| $(".chzn").change -> | |
| el = $(@) | |
| if el.val()? == false or el.val().length < 3 | |
| exists = 0 | |
| exists = el.val().length if el.val()? | |
| $(".metro-stations-counter").html("You can add <strong>#{2 - exists}</strong> more metro station(s) to this organization.</span>") | |
| else | |
| el.val(el.val().slice(0, el.val().length - 1)) | |
| el.trigger("liszt:updated") |
| # make sure you have latest version of below gems | |
| gem install heroku taps sequel | |
| # run command | |
| # heroku db:pull postgres://db_username:@localhost/db_name | |
| heroku db:pull postgres://andy:@localhost/newsite_development |
Validation Output: 32 Errors
Line 6, Column 13: there is no attribute "class"
✉ You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chos
| require 'pty' | |
| cmd = "rake -T" | |
| begin | |
| PTY.spawn( cmd ) do |stdin, stdout, pid| | |
| begin | |
| # Do stuff with the output here. Just printing to show it works | |
| stdin.each { |line| print line } | |
| rescue Errno::EIO | |
| puts "Errno:EIO error, but this probably just means " + | |
| "that the process has finished giving output" |
| gem 'pg' | |
| group :development do | |
| gem 'ruby-debug' | |
| end | |
| gem 'rake', '~> 0.8.7' | |
| gem 'devise' | |
| gem 'oa-oauth', :require => 'omniauth/oauth' | |
| gem 'omniauth' | |
| gem 'haml' | |
| gem 'dynamic_form' |