brianmario / yajl-ruby

A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)
http://rdoc.info/projects/brianmario/yajl-ruby
MIT License
1.48k stars 169 forks source link

It resolves the cannot load such file -- ./lib/yajl-ruby/version issue #223

Open Vasu1105 opened 2 years ago

Vasu1105 commented 2 years ago

I am getting this error while adding gem to vendor set when it tries to load the gem specifications.

Invalid gemspec in [/Users/vjagdale/.inspec/gems/3.0.0/gems/yajl-ruby-1.4.3/yajl-ruby.gemspec]: cannot load such file -- ./lib/yajl/version

Adding the below lines to gemspec file resolves the issue.

ib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'yajl/version'
Vasu1105 commented 1 year ago

Any updates on this?

Vasu1105 commented 1 year ago

@brianmario Any updates on this?