Skip to content

Instantly share code, notes, and snippets.

@butchmarshall
Created January 2, 2016 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save butchmarshall/f9718ee46bc2a99d71ad to your computer and use it in GitHub Desktop.
Save butchmarshall/f9718ee46bc2a99d71ad to your computer and use it in GitHub Desktop.
This will throw: TypeError: superclass mismatch for class MyClass
module MyGem
class MyClass
VERSION = "0.0.1"
end
end
require 'my_gem/my_class/version'
module MyGem
class MyClass < ActiveRecord::Base
end
end
require 'my_gem/my_class/version.rb'
Gem::Specification.new do |spec|
spec.version = MyGem::MyClass::VERSION
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment