The Crystal Programming Language Forum

Upgrade SQLite3 binding version?

I’ve given it the requisite hour of googling and experimentation to no avail, so I seek guidance from the experts :)

I’m trying to use the latest version of SQLite3 with a Crystal project, and I can’t figure out how to upgrade the version of the C binding that crystal-sqlite3 uses (sorry if I’m using the wrong terminology).

I was able to get the actual ‘sqlite3’ command to upgrade, but when I execute queries via the crystal-sqlite3 shard, queries are still running against an old version.

Any hints?

How are you installing the updated sqlite3 package?

$ crystal build --verbose ... should show you the link command used. That will probably reveal the paths where the libsqlite3 is looked at.

You can try either:

  • remove the old package or,
  • tweak the LIBRARY_PATH to include the expected library location
  • tweak the CRYSTAL_LIBRARY_PATH to include the expected library location
  • change the crystal-sqlite3 shard to allow pkg_config config lookup (and setup the PKG_CONFIG_PATH variable to include the location of the .pc file)