Missing File in Gem after Build

后端 未结 1 1566
北海茫月
北海茫月 2020-12-18 19:42

TL;DR:

Don\'t run bundle within an existing git repository. Weird things will happen without any error messages.

Original Question:

相关标签:
1条回答
  • 2020-12-18 20:33

    One of the things bundler did for you is start a local git repo to version-manage your gem code. Check that you have added the file in git

    git add lib/gem_name/missing_file.rb
    

    Bundler generated gems use git internally to track "membership" of source files for the gem. You can see this in the .gemspec where it uses backticks to call out to git and generate a file list:

    gem.files         = `git ls-files`.split($/)
    

    Note this also means you should pay attention to what you list in .gitignore

    0 讨论(0)
提交回复
热议问题