markbates / markbates/configatron
Add Ruby 3.2 Support for Rails apps using this as File.exists? was removed
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 593
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Getting the following error when I try to upgrade my app to Ruby 3.2. Apparently `File.exists?` alias has been removed
```
NoMethodError: undefined method `exists?' for File:Class
/__w/truva/truva/vendor/bundle/ruby/3.2.0/gems/configatron-4.5.1/lib/configatron/integrations/rails.rb:45:in `block in init'
/__w/truva/truva/vendor/bundle/ruby/3.2.0/gems/configatron-4.5.1/lib/configatron/integrations/rails.rb:44:in `each'
/__w/truva/truva/vendor/bundle/ruby/3.2.0/gems/configatron-4.5.1/lib/configatron/integrations/rails.rb:44:in `init'
/__w/truva/truva/config/initializers/configatron.rb:6:in `'
/__w/truva/truva/Rakefile:7:in `require_relative'
/__w/truva/truva/Rakefile:7:in `'
/__w/truva/truva/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `load'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `kernel_load'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:[23](https://github.com/viewthespace/truva/actions/runs/7254710934/job/19764010589?pr=6395#step:14:24):in `run'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli.rb:492:in `exec'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in `dispatch'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in `start'
/home/circleci/.rubygems/gems/bundler-2.4.12/exe/bundle:45:in `block in '
/home/circleci/.rubygems/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/home/circleci/.rubygems/gems/bundler-2.4.12/exe/bundle:33:in `'
/home/circleci/.rubygems/bin/bundle:[25](https://github.com/viewthespace/truva/actions/runs/7254710934/job/19764010589?pr=6395#step:14:26):in `load'
/home/circleci/.rubygems/bin/bundle:25:in `'
```
https://bugs.ruby-lang.org/issues/17391
Added a PR for this: https://github.com/markbates/configatron/pull/112
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/configatron/integrations/rails.rb around lines 44-45, where the Ruby 3.2 error occurs during Rails initialization. Check the linked pull request for the proposed direction, then run the relevant test suite or Rails integration checks. Done means Rails initialization no longer calls the removed File.exists? alias on Ruby 3.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100