NameError: uninitialized constant Mustermann::VERSION when VERSION is already defined
pravi opened this issue · 2 comments
pravi commented
ruby-mustermann-1.0.0$ irb
>> VERSION = '0.0.0'
=> "0.0.0"
>> $:.unshift 'lib'; nil
=> nil
>> require 'mustermann/version'
=> true
>> Mustermann::VERSION
NameError: uninitialized constant Mustermann::VERSION
Did you mean? VERSION
from (irb):5
from /usr/bin/irb:11:in `<main>'
because of this line in lib/mustermann/version.rb:
VERSION ||= '1.0.0'
Changing it to just
VERSION = '1.0.0' works
This was noticed when using gem2deb, you can see details here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866198