Saisui / JXON

A json template for RESTful applications.
MIT License
0 stars 0 forks source link

chore: bundle error when update #1

Open u-u-z opened 1 year ago

u-u-z commented 1 year ago

https://github.com/Saisui/JXON/blob/f52840ea75f356e75c3daa468ec6f0d8432d1985/jxon.gemspec#L27

The gemspec at ./JXON/jxon.gemspec is not valid. Please fix this gemspec.
The validation error was 'jxon-0.1.0 contains itself (jxon-0.1.0.gem), check your files list'

❌ It will report error (in bundle toolchain is like bundle update) like this 👆, cuz the packaged gem file contains itself, which is usually caused by an incorrect file list configuration.

How to fix

For spec.files in jxon.gemspec u can change like this 👇 it will work

spec.files = Dir.chdir(__dir__) do
  `git ls-files -z`.split("\x0").reject do |f|
    (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor]) || f.end_with?(".gem")
  end
end
$ bundle update # <-- plz update after all
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 13.0.6
Using bundler 2.4.10
Using jxon 0.1.0 from source at `.`
Using ast 2.4.2
Using diff-lcs 1.5.0
Using json 2.6.3
Using language_server-protocol 3.17.0.3
Using lint_roller 1.0.0
Using parallel 1.23.0
Using rainbow 3.1.1
Using regexp_parser 2.8.0
Using rexml 3.2.5
Using rspec-support 3.12.0
Using ruby-progressbar 1.13.0
Using unicode-display_width 2.4.2
Using parser 3.2.2.1
Using rspec-core 3.12.2
Using rspec-expectations 3.12.3
Using rspec-mocks 3.12.5
Using standard-custom 1.0.0
Using rubocop-ast 1.28.1
Using rspec 3.12.0
Using rubocop 1.50.2
Using rubocop-performance 1.16.0
Using standard-performance 1.0.1
Using standard 1.28.2
Bundle updated!
Saisui commented 1 year ago

Thank you for your issue!😊 I had fix this problem now!😉

But I am still had a problem for push the gem. when I input password and then press ENTER it errors:

ERROR:  While executing gem ... (NoMethodError)
    undefined method `downcase' for nil:NilClass

    _scheme = scheme.downcase
                    ^^^^^^^^^