Trying to build a gem, getting a Gem::InvalidSpecificationException: "[...] are not files" Trying to build a gem, getting a Gem::InvalidSpecificationException: "[...] are not files" ruby ruby

Trying to build a gem, getting a Gem::InvalidSpecificationException: "[...] are not files"


Excuses for resurrecting this old thread, but I found another cause: if you did not check in git, some old (deleted files) might interfere: on disk they do not exist, but git ls-files migh report them as being included in the gem.

Check in the files and this exact error is over.


This'd be small but important:

Should split('\n') be split("\n")?

Because it looks like

[".gitignoreGemfileRakefileReadme.mdclient_package.gemspeclib/client_package.rblib/client_package/api.rblib/client_package/version.rblib/client_package/...more..."]

could be an array containing a single multiline string, not an array of multiple strings.