yajl-ruby icon indicating copy to clipboard operation
yajl-ruby copied to clipboard

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

Open Vasu1105 opened this issue 3 years ago • 2 comments

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 avatar Sep 08 '22 08:09 Vasu1105

Any updates on this?

Vasu1105 avatar Nov 23 '22 08:11 Vasu1105

@brianmario Any updates on this?

Vasu1105 avatar Nov 28 '22 08:11 Vasu1105