Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError on Ruby 3.2 for File.exists? #1024

Open
p8 opened this issue Jan 12, 2023 · 6 comments
Open

NoMethodError on Ruby 3.2 for File.exists? #1024

p8 opened this issue Jan 12, 2023 · 6 comments

Comments

@p8
Copy link
Contributor

p8 commented Jan 12, 2023

Ruby 3.2 removed the deprecated File.exists? and now Sunspot raises the following error on Ruby 3.2:

NoMethodError: undefined method `exists?' for File:Class

#1016 fixes this by replacing File.exists? with File.exist?.
I would love to see that PR merged. 🙇
Thanks!

@fmorton
Copy link

fmorton commented May 1, 2023

Same here:

NoMethodError: undefined method exists?' for File:Class /Users/snip/.gems/gems/sunspot_solr-2.6.0/lib/sunspot/solr/server.rb:174:in install_solr_home'
/Users/snip/.gems/gems/sunspot_solr-2.6.0/lib/sunspot/solr/server.rb:40:in bootstrap' /Users/snip/.gems/gems/sunspot_solr-2.6.0/lib/sunspot/solr/server.rb:55:in start'
/Users/snip/.gems/gems/sunspot_solr-2.6.0/lib/sunspot/solr/tasks.rb:10:in block (3 levels) in <top (required)>' /Users/snip/.rbenv/versions/3.2.2/bin/bundle:25:in load'
/Users/snip/.rbenv/versions/3.2.2/bin/bundle:25:in `

'
Tasks: TOP => sunspot:solr:start

@maximus242
Copy link

We should probably release a new version of sunspot that integrates these changes as anyone downloading from Ruby Gems will have their app break on 3.2.0 https://rubygems.org/gems/sunspot_rails

@rocket-turtle
Copy link
Contributor

The fix is merged in #1034

maybe @serggl could release a new Version?

@FredHasselot
Copy link

Same problem here. locally I make the change but it will block a production release. Is it possible for you to make a new version with the changes?

Anyone ?

Thanks

@fmorton
Copy link

fmorton commented Oct 5, 2023 via email

@FredHasselot
Copy link

Cool, it looks better. Thanks.
It will be okay temporarily for this issue.

The automated tests of github action do not pass. I was trying to run Solr in the CI like I do locally before running the Rspec tests. (it works locally) but that's another question...

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

No branches or pull requests

5 participants