Freika / dawarich

Self-hosted alternative to Google Location History (Google Maps Timeline)
https://dawarich.app
GNU Affero General Public License v3.0
2.11k stars 47 forks source link

App container fails to start after updating from 0.15.3 to 0.15.4 without manual cleaning gem cache #339

Open sermelipharo opened 1 week ago

sermelipharo commented 1 week ago

Describe the bug
After updating dawarich_app from version 0.15.3 to 0.15.4, the app container fails to start. No changes were made to the configuration, and downgrading back to 0.15.3 resolves the issue. The issue seems to be related to gem caching, and clearing the gem cache before the update might help.

Version
Dawarich version: 0.15.4

To Reproduce
Steps to reproduce the behavior:

  1. Have a working instance of Dawarich running on version 0.15.3.
  2. Update the dawarich_app container image to version 0.15.4.
  3. Run docker-compose up to restart the services.
  4. Observe that dawarich_app fails to start.

Expected behavior
The dawarich_app container should start without issues after upgrading from 0.15.3 to 0.15.4.

Screenshots
N/A.

Logs
Logs from dawarich_app container after the failed start:

Environment: development
dawarich_db (172.22.0.2:5432) open
/usr/local/lib/ruby/site_ruby/3.3.0/rubygems/exceptions.rb:4:in `require_relative': cannot load such file -- /usr/local/lib/ruby/site_ruby/3.3.0/rubygems/unknown_command_spell_checker (LoadError)
    from /usr/local/lib/ruby/site_ruby/3.3.0/rubygems/exceptions.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:1325:in `require_relative'
    from /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:1325:in `<top (required)>'
    from <internal:gem_prelude>:2:in `require'
    from <internal:gem_prelude>:2:in `<internal:gem_prelude>'

Additional context
Clearing the gem cache before the update (either manually or by deleting the gem_cache volume) resolves the issue, suggesting that the problem might be related to gem caching.

chrisl8 commented 1 week ago

I think that I'm having this issue too. I was doing some testing and found that on each restart I had to delete the gem cache volume. Without deleting the gem cache volume I was getting errors like this constantly:

dawarich          | /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:16:in `require_relative': cannot load such file -- /usr/local/lib/ruby/site_ruby/3.3.0/rubygems/compatibility (LoadError)
dawarich          |     from /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:16:in `<top (required)>'
dawarich          |     from <internal:gem_prelude>:2:in `require'
dawarich          |     from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
dawarich          | /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:16:in `require_relative': cannot load such file -- /usr/local/lib/ruby/site_ruby/3.3.0/rubygems/compatibility (LoadError)
dawarich          |     from /usr/local/lib/ruby/site_ruby/3.3.0/rubygems.rb:16:in `<top (required)>'
dawarich          |     from <internal:gem_prelude>:2:in `require'
dawarich          |     from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
chrisl8 commented 1 day ago

This doesn't seem to happen to me anymore. Was it just a one time glitch for our setups, or was it fixed, or is it still a possible issue?

@sermelipharo Are you still having this issue?

sermelipharo commented 1 day ago

seems to be fixed