string contains null byte
bundle gemしてコード書いて、ちょっと動かしてみようとしたところ
$ bundle check
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?
I ran the command `/.../.rbenv/versions/2.3.1/bin/bundle check`
- What did you expect to happen?
I expected Bundler to...
- What happened instead?
Instead, what actually happened was...
Error details
ArgumentError: string contains null byte
/.../.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2677:in `directory?'
[...]
なんだこれ? としばし悩む。
……わりと悩んだ結果、"
を'
に置換しすぎていたのが原因ということに気付いた。
spec.files = `git ls-files -z`.split('\x0').reject { |f| f.match(%r{^(test|spec|features)/}) }
'\x0'
ではダメだよな。"\x0"
でした。
pデバッグした。