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

Remove ttl from redis initialization options for redis-rb v5 #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoshoku
Copy link

@yoshoku yoshoku commented May 24, 2023

redis-rb v5 depends on redis_client, and redis_client's initialize method does not have ttl keyword argument, so specifying the ttl option in redis-session-store will cause an ArgumentError when starting Rails. This problem can be solved by not giving the ttl option to Redis.new, as in #137.

$ bin/rails s
=> Booting Puma
=> Rails 7.0.4.3 application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
/home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-client-0.14.1/lib/redis_client/config.rb:21:in `initialize': unknown keyword: :ttl (ArgumentError)
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-client-0.14.1/lib/redis_client/config.rb:184:in `initialize'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-client-0.14.1/lib/redis_client.rb:143:in `new'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-client-0.14.1/lib/redis_client.rb:143:in `config'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-5.0.6/lib/redis/client.rb:23:in `config'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-5.0.6/lib/redis.rb:157:in `initialize_client'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-5.0.6/lib/redis.rb:73:in `initialize'
	from /home/foo/.anyenv/envs/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/redis-session-store-0.11.5/lib/redis-session-store.rb:46:in `new'
...

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