From d59426e4222ecf7e4dedf24be3bfa909d8e027da Mon Sep 17 00:00:00 2001 From: Chris Olstrom Date: Mon, 22 Aug 2016 13:23:19 -0700 Subject: [PATCH 1/2] Fix missing dependency in gemspec `activemodel-serializers-xml` is required for this gem to load, but is not currently included in `activemodel`. It was extracted for ActiveModel v5.x. Either adding it to the dependencies, or applying a `~> 4.2` constraint to the `activemodel` dependency resolves this. I've opted for the former in this patch. --- related.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/related.gemspec b/related.gemspec index bad6875..d209395 100644 --- a/related.gemspec +++ b/related.gemspec @@ -24,4 +24,5 @@ Gem::Specification.new do |s| s.add_dependency('redis', '> 2.0.0') s.add_dependency('redis-namespace', '> 0.8.0') s.add_dependency('activemodel') -end \ No newline at end of file + s.add_dependency('activemodel-serializers-xml') +end From 365196cbb491e767e0ddbe17723f83da66934e61 Mon Sep 17 00:00:00 2001 From: Chris Olstrom Date: Mon, 22 Aug 2016 13:25:47 -0700 Subject: [PATCH 2/2] Add missing dependency to library Adding it to the `gemspec` is half the battle, this is the other half. It needs to be required separately, as it has been extracted from ActiveModel. --- lib/related.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/related.rb b/lib/related.rb index 77e353c..04e958a 100644 --- a/lib/related.rb +++ b/lib/related.rb @@ -1,6 +1,7 @@ require 'redis' require 'redis/namespace' require 'active_model' +require 'activemodel-serializers-xml' require 'related/version' require 'related/helpers' @@ -51,4 +52,4 @@ def redis self.redis end -end \ No newline at end of file +end