On Mon, Jun 13, 2016 at 02:12:20PM -0300, Lucas Severo Alves wrote: > Hi all, > > We are trying to make a debian package of the musterman19 gem, since we > need to make the debian package of grape and grape swagger and its > dependencies. running gem2deb on the mustermann19-0.4.3.gem file I get this > error: > > > Invalid gemspec in [mustermann.gemspec]: uninitialized constant > Mustermann::VERSION > Did you mean? VERSION > Invalid gemspec in [mustermann.gemspec.gem2deb]: uninitialized constant > Mustermann::VERSION > Did you mean? VERSION > /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:116:in `load_gemspec': E: > cannot load gemspec mustermann.gemspec (RuntimeError) > from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:33:in `block in > initialize' > from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:32:in `chdir' > from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:32:in `initialize' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:235:in `new' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:235:in > `read_metadata' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:86:in > `initialize_from_directory' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:205:in `block in > build' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:202:in `chdir' > from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:202:in `build' > from /usr/bin/gem2deb:118:in `<main>' > > The gemspec is trying to load 's.version = Mustermann::VERSION', > and ruby-mustermann19-0.4.3/lib/version.rb sets it: > > module Mustermann > VERSION ||= '0.4.3' > end you might have found a bug in gem2deb, but I'm not sure how to fix it yet. If you change that ||= to just = it will work, but you should probably send that patch upstream otherwise you will have to update that patch at every single new upstream release, since the line with the versin number _will_ be updated at every release.
Attachment:
signature.asc
Description: PGP signature