I came across this problem because when gem 'version' was included after gem 'bitly', it would cause an error when I tried to run a rake task.
undefined method 'to_version' for "1.2.8":String
When I included gem 'version' first, it would run without problems.
So, I think what is happening is that the line $:.unshift File.dirname(__FILE__) is including all of the /lib/bitly files in the load path and causing naming conflicts. Is there a reason why that line is in there at all? I changed the file to look like this and it fixed the problem.
I came across this problem because when
gem 'version'
was included aftergem 'bitly'
, it would cause an error when I tried to run a rake task.undefined method 'to_version' for "1.2.8":String
When I included
gem 'version'
first, it would run without problems.So, I think what is happening is that the line
$:.unshift File.dirname(__FILE__)
is including all of the/lib/bitly
files in the load path and causing naming conflicts. Is there a reason why that line is in there at all? I changed the file to look like this and it fixed the problem.