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

Reference to Redis::Factory instead of Redis::Store::Factory in redis-activesupport #210

Closed
pierre-pretorius opened this issue Aug 20, 2013 · 21 comments

Comments

@pierre-pretorius
Copy link

My Gemfile contains:

gem 'rails', '~> 3.2'
gem 'redis-rails'

This causes bundler to install:

redis-rails (3.2.3)
redis-activesupport (3.2.3)
redis-store (1.1.4)

There is a reference to Redis::Factory instead of Redis::Store::Factory in:
gems/redis-activesupport-3.2.3/lib/active_support/cache/redis_store.rb

Which throws:
redis-activesupport-3.2.3/lib/active_support/cache/redis_store.rb:27:in `initialize': uninitialized constant Redis::Factory (NameError)

Can you please update this reference or fix the dependencies? For now I have locked my redis-store gem version to 1.1.3.

Thank you

@liquid1982
Copy link

Same problem here, my app fails to start with the same error.

@plexus
Copy link

plexus commented Aug 20, 2013

Confirmed, this patch release contains a change that breaks backwards compatibility.

You can put something like this in your Gemfile as a temporary fix

gem 'redis-store', '> 1.1.0', '< 1.1.4'

@lmars
Copy link

lmars commented Aug 21, 2013

I am seeing this too. I am using Rails 3.2 but I can't use @plexus's suggestion because I need the bug fixes in the 1.1.4 release.

Have you now dropped Rails 3 support in the latest release of redis-activesupport? My current workaround is to have this in my Gemfile:

gem "redis-activesupport", :git => "https://github.com/jodosha/redis-store.git", :ref => "8ad9133"
gem "redis-store", "1.1.4"

@niedfelj
Copy link

Same issue, I was able to downgrade to 1.1.3. @lmars I think you could class Redis::Factory << Redis::Store::Factory; end in an initializer if you need 1.1.4, although I haven't tested this (might need to be at the top of the env file loading the config.

@deevis
Copy link

deevis commented Aug 21, 2013

I put the following line in my application.rb as a workaround:

Redis::Factory = Redis::Store::Factory

@ethier
Copy link

ethier commented Aug 21, 2013

@deevis I used your suggestion. I couldn't get an initializer to work as expected.

@apsoto
Copy link

apsoto commented Aug 22, 2013

Won't fix the problem, but a breaking change like this should warrant a major version bump if it breaks existing clients.

http://semver.org/

@plexus
Copy link

plexus commented Aug 22, 2013

@apsoto exactly, which is why I'm curious to have a response from the developers. Was this intentional? Will it be rolled back in 1.1.5? will the gem be pulled? etc...

@liquid1982
Copy link

Is the 1.1.4 working in Rails 4, right?

@plexus
Copy link

plexus commented Aug 22, 2013

maybe something like https://github.com/plexus/redis-store/compare/deprecation_warning could be a compromise? I didn't make a PR yet to not make a separate issue.

@apsoto
Copy link

apsoto commented Aug 22, 2013

@plexus looks good

@jeremywadsack
Copy link

👍 @plexus's fix worked for us for right now, but would appreciate a non-breaking deprecation notice.

@niedfelj
Copy link

@jodosha can we get some input here?

@Hettomei
Copy link

Same problem here. Thanks for the temporary fix.

@sagivo
Copy link

sagivo commented Aug 27, 2013

this fixed the error for me:
gem 'redis-store', '1.1.3'

@jodosha
Copy link
Member

jodosha commented Aug 29, 2013

I'm deeply sorry for the problem that a tiny refactoring had caused to your applications.

Post mortem explanation:
As you probably noticed, I've split all the gems in a separate repository under the https://github.com/redis-store organization. By its nature, redis-store family generates a versions' matrix which is hard to handle under a single repo. Consider that we support multiple Ruby implementations, versions, frameworks and frameworks' versions.

During this transition I had to drop for a few days CI builds for the old Rails versions, and this operation had prevented me to recognize the mistake I did with that refactoring.

Actually I'm on vacation and used my free afternoons to slowly complete this transition and release a new redis-rails version to fix this problem (http://rubygems.org/gems/redis-rails/versions/3.2.4).

Again, if you take care of a certain framework, I'm actively looking for maintainers here.

Luca

@armhold
Copy link

armhold commented Sep 5, 2013

Sorry to muddy the waters even further, but are you aware of this security advisory? Seems like redis-store is now depending on redis-namespace 1.2.1, which still has the vulnerability.

@jonhyman
Copy link

jonhyman commented Sep 5, 2013

@jodosha Can you release an updated version of redis-activesupport for 3.x? Pulling the latest redis-activesupport 3.2.4 does not have the read_multi fix in it.

@cheald
Copy link

cheald commented Sep 23, 2013

+1 on a new release with a fix for this. If at all possible, it'd be nice if the redis-rack version restriction was relaxed, too, since there are a number of bugfixes in rack 1.5.x that would be really useful in 3.2.x applications.

@jeremywadsack
Copy link

Note to self when I come back here again: Upgrade to redis-rails 4.0.0 and that will solve this (provided you're moving to Rails 4).

@radar
Copy link
Member

radar commented Feb 13, 2015

Hi all, what needs to be done here? Do we need a new release of redis-activesupport still? Is there anything else?

@tubbo tubbo closed this as completed Feb 4, 2016
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