Skip to content

Instantly share code, notes, and snippets.

@robsyme
Created November 14, 2011 05:18
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 robsyme/1363302 to your computer and use it in GitHub Desktop.
Save robsyme/1363302 to your computer and use it in GitHub Desktop.
Error report for Bioruby support for

After installing the BioSQL schema, Bio::SQL::establish_connection(CONNECTION_INFO_HERE) throws an ActiveRecord::StatementInvalid error when it tries to create the first ontology in bio/io/biosql/biosql.rb:31:in establish_connection:

Bio::SQL::Ontology Load (0.8ms)  SELECT "ontology".* FROM "ontology" WHERE (name = 'Annotation Tags') LIMIT 1
 (0.2ms)  BEGIN
SQL (0.8ms)  INSERT INTO "ontology" ("definition", "name") VALUES ($1, $2) RETURNING "ontology_id"  [["definition", nil], ["name", "Annotation Tags"]]
 (0.1ms)  ROLLBACK

raises:

PGError: ERROR:  cannot perform INSERT RETURNING on relation "ontology"
HINT:  You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.
: INSERT INTO "ontology" ("definition", "name") VALUES ($1, $2) RETURNING "ontology_id"
ActiveRecord::StatementInvalid: PGError: ERROR:  cannot perform INSERT RETURNING on relation "ontology"
HINT:  You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.

Relevant Gems installed:

  • activerecord (3.1.1)
  • composite_primary_keys (4.1.1)
  • pg (0.11.0)
  • bio (HEAD)

Using:

  • psql (PostgreSQL) 9.1.1
  • BioSQL schema version 1.0.1 and
  • ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
@rjpbonnal
Copy link

I need to update or check the library before digging into this.

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