Skip to content

Comments

Fix VERSION file path resolution for Docker containers#139

Merged
neonwatty merged 1 commit intomainfrom
feature/drag-drop-image-upload
Nov 18, 2025
Merged

Fix VERSION file path resolution for Docker containers#139
neonwatty merged 1 commit intomainfrom
feature/drag-drop-image-upload

Conversation

@neonwatty
Copy link
Owner

Problem: VERSION initializer was looking for file at Rails.root/../.., but in Docker builds the VERSION file is copied to Rails.root, causing it to display "unknown" in production containers.

Solution: Update initializer to check Rails.root first (Docker), then fall back to repository root path (development/local).

Changes:

  • Check if VERSION exists at Rails.root/VERSION first
  • Fall back to Rails.root/../../VERSION for development
  • Maintains compatibility with both Docker and local development

Testing:

  • Development: APP_VERSION = "2.0.1" ✓
  • Docker: APP_VERSION = "2.0.1" ✓
  • All pages controller tests passing (7/7)

🤖 Generated with Claude Code

Problem: VERSION initializer was looking for file at Rails.root/../..,
but in Docker builds the VERSION file is copied to Rails.root, causing
it to display "unknown" in production containers.

Solution: Update initializer to check Rails.root first (Docker), then
fall back to repository root path (development/local).

Changes:
- Check if VERSION exists at Rails.root/VERSION first
- Fall back to Rails.root/../../VERSION for development
- Maintains compatibility with both Docker and local development

Testing:
- Development: APP_VERSION = "2.0.1" ✓
- Docker: APP_VERSION = "2.0.1" ✓
- All pages controller tests passing (7/7)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@neonwatty neonwatty merged commit e412953 into main Nov 18, 2025
5 checks passed
@neonwatty neonwatty deleted the feature/drag-drop-image-upload branch November 19, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant