Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ArgumentError (undefined class/module) memcached-client dependency loading hack
class << Marshal
def load_with_rails_classloader(*args)
begin
load_without_rails_classloader(*args)
rescue ArgumentError, NameError => e
if e.message =~ %r(undefined class/module)
const = e.message.split(' ').last
const.constantize
retry
else
raise(e)
end
end
end
alias_method_chain :load, :rails_classloader
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.