Skip to content

Instantly share code, notes, and snippets.

@sanemat
Created July 21, 2014 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanemat/578350d3762eea4aca34 to your computer and use it in GitHub Desktop.
Save sanemat/578350d3762eea4aca34 to your computer and use it in GitHub Desktop.
wercker-postgres-json-type

I met ERROR: type "json" does not exist

rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR:  type "json" does not exist
LINE 1: ...ULT 0 NOT NULL, "job_class" text NOT NULL, "args" json DEFAU...

with:

box: wercker/rvm
services:
   - wercker/postgresql
build:
    steps:
        - rvm-use:
               version: 2.1.2
        - script:
            name: Make tmp directory
            code: mkdir tmp
        - script:
            name: Enable virtual display
            code: |-
              export DISPLAY=:99.0
              start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
              sleep 3
        - install-packages:
            packages: libqtwebkit-dev
        - bundle-install
        - rails-database-yml
        - script:
            name: echo ruby information
            code: |
                echo "ruby version $(ruby --version) running"
                echo "from location $(which ruby)"
                echo -p "gem list: $(gem list)"
        - script:
            name: Set up db
            code: RAILS_ENV=test bin/rake db:schema:load
        - script:
            name: Run RSpec
            code: bin/rake
@sanemat
Copy link
Author

sanemat commented Jul 21, 2014

Use wercker/postgresql92 and this works fine.

support says:

Hi,

The current postgresql version is 9.1. This version does not support json. 

You could try the wercker/postgresql92 box: https://app.wercker.com/#applications/51f7ed70b8978c35480006f7/tab/details

Or you could try some of the community boxes: https://app.wercker.com/#explore/boxes/search/postgresql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment