<#148 Error with SQLite Backend> Issue created by ...
# pact-broker
g
#148 Error with SQLite Backend Issue created by JP-Ellis I am trying to run the
pact-broker
image using the SQLite backend within a test suite. Unfortunately, the image crushes with the main error being:
Copy code
! Unable to load application: Sequel::AdapterNotFound: LoadError: cannot load such file -- sqlite3/sqlite3_native
bundler: failed to load command: puma (/pact_broker/vendor/bundle/ruby/3.2.0/bin/puma)
Steps to reproduce and Logs
Copy code
docker run \
    --env PACT_BROKER_DATABASE_ADAPTER=sqlite \
    --env PACT_BROKER_DATABASE_NAME=pact_broker.sqlite \
    pactfoundation/pact-broker:latest-multi
``` Puma starting in single mode... * Puma version: 5.6.7 (ruby 3.2.1-p31) ("Birdie's Version") * Min threads: 0 * Max threads: 5 * Environment: production * PID: 2 2023-09-17 235639.408758 I [2:3240] pact-broker -- Connecting to database: -- {:adapter=>"sqlite", :database=>"pact_broker.sqlite", :encoding=>"utf8", sql log level=&gt;none, :enable_caller_logging=>false, :log_warn_duration=>5.0, :pool_timeout=>5, :connect_max_retries=>0, :password=>"*****"} ! Unable to load application: Sequel:AdapterNotFound LoadError: cannot load such file -- sqlite3/sqlite3_native bundler: failed to load command: puma (/pact_broker/vendor/bundle/ruby/3.2.0/bin/puma) <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require': LoadError: cannot load such file -- sqlite3/sqlite3_native (Sequel::AdapterNotFound) from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sqlite3-1.6.3-aarch64-linux/lib/sqlite3.rb6in `rescue in <top (required)>' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sqlite3-1.6.3-aarch64-linux/lib/sqlite3.rb2in `<top (required)>' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/adapters/sqlite.rb3in `<top (required)>' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/connecting.rb87in `load_adapter' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/connecting.rb17in `adapter_class' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/connecting.rb45in `connect' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/core.rb124in `connect' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/initializers/database_connection.rb17in `block in create_database_connection' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/initializers/database_connection.rb31in `with_retries' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/initializers/database_connection.rb16in `create_database_connection' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/app.rb135in `configure_database_connection' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/app.rb99in `post_configure' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/pact_broker-2.107.1/lib/pact_broker/app.rb50in `initialize' from config.ru:4:in `new' from config.ru:4:in `block in <main>' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb116in `eval' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb116in `new_from_string' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb105in `load_file' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb66in `parse_file' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/configuration.rb348in `load_rackup' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/configuration.rb270in `app' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/runner.rb150in `load_and_bind' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/single.rb44in `run' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/launcher.rb193in `run' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/cli.rb81in `run' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/bin/puma10in `<top (required)>' from /pact_broker/vendor/bundle/ruby/3.2.0/bin/puma25in `load' from /pact_broker/vendor/bundle/ruby/3.2.0/bin/puma25in `<top (required)>' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli/exec.rb58in `load' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli/exec.rb58in `kernel_load' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli/exec.rb23in `run' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli.rb492in `exec' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb27in `run' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb127in `invoke_command' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb392in `dispatch' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli.rb34in `dispatch' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb485in `start' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/cli.rb28in `start' from /usr/local/bundle/gems/bundler-2.4.12/exe/bundle45in `block in <top (required)>' from /usr/local/bundle/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb117in `with_friendly_errors' from /usr/local/bundle/gems/bundler-2.4.12/exe/bundle33in `<top (required)>' from /usr/local/bundle/bin/bundle25in `load' from /usr/local/bundle/bin/bundle25in `<main>' <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sqlite3-1.6.3-aarch64-linux/lib/sqlite3.rb6in `rescue in <top (required)>' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sqlite3-1.6.3-aarch64-linux/lib/sqlite3.rb2in `<top (required)>' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/adapters/sqlite.rb3in `<top (required)>' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from <internal/usr/local/lib/ruby/3.2.0/rubygems/core ext/kernel require.rb&gt;37:in `require' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/connecting.rb87in `load_adapter' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/connecting.rb17in `adapter_class' from /pact_broker/vendor/bundle/ruby/3.2.0/gems/sequel-5.71.0/lib/sequel/database/c… pact-foundation/pact-broker-docker