Ruby - running gem install causes missing yml file

Viewed 40

I have created my gem and I run gem build badwordgem.gemspec then gem install badwordgem-0.1.0.gem it installs it locally just fine on my machine in my :C drive

but when I check the files under (C:\Ruby30-x64\lib\ruby\gems\3.0.0\gems\badwordgem-0.1.0)

I am missing my badlist.yml which should be located inside the lib folder.

Any idea why this is happening or any fixes for this?

UPDATE Here is my files line from my gemspec.

spec.files = Dir.chdir(File.expand_path(__dir__)) do
    `git ls-files -z`.split("\x0").reject do |f|
      (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
    end
  end ```


**I've tried this now**

spec.files = Dir.glob("{bin,lib}/**/*") 

This includes the .yml file in my lib folder when I install locally but then everything else outside of lib folder ins't there such as gemspec etc.

0 Answers
Related