I'm building a gem from a currently working ruby program. It's using jruby 1.7.12 and, among other things, does a "require 'yaml". For the gem, my Gemfile contains:
source 'https://rubygems.org'
gemspec
When I run
gem build program.gemspec
that works just fine, but when I run
gem install program-0.15.01.gem
it fails with
ERROR: Could not find a valid gem 'yaml' (>= 0) in any repository
ERROR: Possible alternatives: aml, cyaml, haml, maml, raml
Doesn't make any sense since the yaml module is part of the ruby 1.9.3 standard library.
I've upgraded to the latest rubygems (2.4.5).
What the heck am I missing?
yaml
is part of Ruby. There is no yaml
gem (see https://rubygems.org/search?query=yaml).
Therefore remove
s.add_runtime_dependency 'yaml'
from your gemspec
and just add require 'yaml'
to the file in which you want to use YAML
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With