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

Possible to use without Hiredis? #33

Closed
pehrlich2 opened this issue Apr 17, 2023 · 9 comments
Closed

Possible to use without Hiredis? #33

pehrlich2 opened this issue Apr 17, 2023 · 9 comments

Comments

@pehrlich2
Copy link

Hello!

Doing first-time setup here. Following the given installation instructions on ruby 3.2.2 and either OSX or Heroku, I get the following error when starting the server:

LoadError: cannot load such file -- redis/connection/hiredis

Any tips for how to troubleshoot this? Is it possible to opt out of Hiredis, even temporarily? Thanks!

@pehrlich2
Copy link
Author

pehrlich2 commented Apr 17, 2023

Looks like this may be the root cause - perhaps there are some minor changes required on the side of simple-feed for compatibility here redis/redis-rb#1178

Edit: seems like editing lib/simplefeed/providers/redis/driver.rb to comment out require 'redis/connection/hiredis' and instead put require "hiredis-client" seems to get my app to boot. It will take a little more time to know if it seems to work as this gem is new to me!

@kigster
Copy link
Owner

kigster commented May 10, 2023

@pehrlich2 thank you so much for reporting this. I would like to clarify your request:

  • Would you rather see hiredis be optional or
  • do I simply need to change the require to match the recent changes in the hiredis gem?

The reason for hiredis to begin with is that it provides a much faster communications with the redis server, where the most high throughput functions are written in plain C.

Let me know!

@pehrlich2
Copy link
Author

pehrlich2 commented May 10, 2023 via email

@kigster
Copy link
Owner

kigster commented May 19, 2023

Any chance you might be open to submitting a PR with your solution?

It be great if hiredis was optional, but the README explained how to enable it for high throughput.

@kigster
Copy link
Owner

kigster commented Dec 13, 2023

Is this still an issue that need solving?

@bkmaibach
Copy link

Is this still an issue that need solving?

Yes please!

@bkmaibach
Copy link

bkmaibach commented May 2, 2024

If you are attempting to use this gem in rails without hiredis (standary ruby driver only) in rails with Redis >5 you can do the following:

Add the following line to boot.rb:
$LOAD_PATH.unshift(File.expand_path('../../lib/overrides', FILE))

And then add an empty file at:
lib/overrides/redis/connection/hiredis.rb

@kigster
Copy link
Owner

kigster commented May 4, 2024

Thanks. I'll release a fix for this shortly

@kigster
Copy link
Owner

kigster commented Jul 23, 2024

Fixed in version 3.2.0, by #38 and #35

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

3 participants