Put lib on the load path at every entry point; use plain requires
Fix the CI failure: the Rakefile builds an App at load time (for the db:
tasks) in the bare rake process, which lacked lib/ on the load path, so
db.extension(:sole) couldn't require "sequel/extensions/sole". Add the
load-path setup to the Rakefile too, and — now that lib/ is on the path —
switch config.ru and the Rakefile to plain `require "app"` / `require
"web"` instead of require_relative.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N92HLTepkg3AtRpDUyZ54o
change
commit 7bed66cc1127328bd46661c97571e696db9b2a58
author Claude <noreply@anthropic.com>
date
parent 05530cc0
diff --git a/Rakefile b/Rakefile
index 3b014ff..9553930 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,11 @@
+# Put lib/ on the load path so plain requires and Sequel's extension loader
+# (db.extension(:sole) -> require "sequel/extensions/sole") resolve. The test
+# task adds lib/ for the spawned test run, but this Rakefile also builds an App
+# at load time for the db: tasks, which runs in the bare rake process.
+$LOAD_PATH.unshift(File.expand_path("lib", __dir__))
+
 require "minitest/test_task"
-require_relative "lib/app"
+require "app"
 require "sequel/extensions/migration"
 
 DOMUS_APP = Domus::App.new
diff --git a/config.ru b/config.ru
index 5f0512f..475d469 100644
--- a/config.ru
+++ b/config.ru
@@ -1,10 +1,9 @@
-# Put lib/ on the load path so Sequel can load our dataset extensions by name
-# (e.g. db.extension(:sole) -> require "sequel/extensions/sole"). `rake test`
-# already adds lib/ for the test run.
+# Put lib/ on the load path so plain requires and Sequel's extension loader
+# (db.extension(:sole) -> require "sequel/extensions/sole") resolve.
 $LOAD_PATH.unshift(File.expand_path("lib", __dir__))
 
-require_relative "lib/app"
-require_relative "lib/web"
+require "app"
+require "web"
 require "sequel/extensions/migration"
 
 app = Domus::App.new