bundling postgres extension


gem install pgbundle


define your dependent postgres extensions in a Pgfile like this:


database 'my_database', host: 'my.db.server', use_sudo: true, system_user: 'postgres'

pgx 'hstore'
pgx 'my_extension', '1.0.2', github: me/my_extension
pgx 'my_other_extionsion', :git => ''
pgx 'my_ltree_dependend_extension', github: me/my_ltree_dependend_extension, require: 'ltree'

install your extension

pgbundle install

installs the extensions and dependencies on your database server

check your dependencies

pgbundle check

checks whether all dependencies are available for creation on the database server

getting started

if your already have some database on your current project you can get a starting point with

pgbundle init

lets say your database named 'my_project' runs on localhost with user postges

pgbundle init my_project -u postgres -h localhost