redis / hiredis-rb

Ruby wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
319 stars 90 forks source link

Cannot load `redis/connection/hiredis` on application start #92

Closed vietqhoang closed 1 year ago

vietqhoang commented 1 year ago

Environment

Backtrace

/Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require': cannot load such file -- redis/connection/hiredis (LoadError)
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler/runtime.rb:55:in `each'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler/runtime.rb:55:in `block in require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler/runtime.rb:44:in `each'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler/runtime.rb:44:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bundler-2.4.3/lib/bundler.rb:195:in `require'
        from /Users/viet/Workspaces/wanikani/config/application.rb:24:in `<main>'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/railties-7.0.4.2/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/railties-7.0.4.2/lib/rails/commands/server/server_command.rb:134:in `perform'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/railties-7.0.4.2/lib/rails/command/base.rb:87:in `perform'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/railties-7.0.4.2/lib/rails/command.rb:48:in `invoke'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/railties-7.0.4.2/lib/rails/commands.rb:18:in `<main>'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'

Observation

I am coming off a redis update from 4.8.0. Prior to the upgrade to 5.0.6 my application loads without issue.

The error appears when I boot up my application using rails s

I have tried looking at the https://github.com/redis/redis-rb for issues pertaining to loading hiredis in the new major version 5 update, but I couldn't source anything.

In the application's Gemfile hiredis is required as such,

gem 'redis', require: ['redis', 'redis/connection/hiredis']

Any guidance on figuring out this issue is appreciated.

braydensterrett commented 1 year ago

Bump, I have this exact same issue.

vietqhoang commented 1 year ago

Made an issue here over at redis/redis-rb. It seems there have been changes there which caused the issue. Basically the lib/redis/connection/hiredis.rb file is no longer present.

https://github.com/redis/redis-rb/issues/1178

vietqhoang commented 1 year ago

Closing this issue. I received a response in https://github.com/redis/redis-rb/issues/1178.