not sure we have right syntax or understand how to use extension 
table was created fine, but insert failed

db.extension :pg_json
# added this after defining db

db.run(" create table " + table + 
      "(id serial primary key, data jsonb)")
=> works fine 
Table "public.signups"
 Column |  Type   |                      Modifiers                       | 
Storage  | Stats target | Description 
--------+---------+------------------------------------------------------+----------+--------------+-------------
 id     | integer | not null default nextval('signups_id_seq'::regclass) | 
plain    |              | 
 data   | jsonb   |                                                      | 
extended |              | 
Indexes:
    "signups_pkey" PRIMARY KEY, btree (id)


puts data
db[:signups].insert(:data=>Sequel.pg_json(data))
{"full_name":"Jack Staff","organization":"Tiger 
Nassau","product":"ibi","email":"[email protected]","postal_code":"59912","status":"1","created_at":"2015-06-12","updated_at":"2015-06-12"}
=> correct input hash converted to json

/var/lib/gems/2.1.0/gems/sequel-4.23.0/lib/sequel/extensions/pg_json.rb:281:in 
`pg_json': undefined method `pg_json_op' for Sequel:Module (NoMethodError)

any ideas ?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to