git - Ruby Gem won't build: Gem::InvalidSpecificationException [...] are not files -


i trying build gem, keep getting:

warning:  see http://guides.rubygems.org/specification-reference/ error:  while executing gem ... (gem::invalidspecificationexception)   [*list of 300 file paths*] not files 

i know files must added git, , have done so. date.

what strikes me file paths in list of subdirectory, path missing several folders.

example:

in list: bin/some_file.jar actual file: bin/some_library/lib/some_file.jar 

i suspected has how git set up, because gem in "mother git folder" has several projects, including couple of gems, so:

mother folder   -> .git   -> gemfolder1   -> gemfolder2   -> someotherproject 

it appears amble both build , install gem1, gem2 gives me these errors.

initially had folder . in folder name, thought problem. renamed folder, added changes git, , retried. however, still had same exact issue.

i think strange, , makes me suspect there strange bug in gem itself.

furthermore, when manually run

`git ls-files -z`.split("\x0") 

in ruby, files show "are not files" don't exist in list.

what going on here?

i figured out causing this:

i had default settings in gemspec file, creates line:

spec.executables   = spec.files.grep(%r{^bin/}) { |f| file.basename(f) } 

what happens file in subfolder within bin folder stripped away files path, bin/some_folder/some.executable transformed bin/some.executable.

this is, in opinion bug in defaults bundler.

because had small gem solved writing:

spec.executables   = [] 

i believe won't need files registered executables (i might wrong).

what write:

spec.files.grep(%r{^bin/}) { |f| f[3..-1] } 

this more suitable solution people. me, didn't work because had non-executable files in there causing problems.

hope helps out there :)


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -