Gem install fails with "Could not find valid gem" yaml "
I am creating a gem from the current working ruby ββprogram. It uses jruby 1.7.12 and, among other things, does "require" yaml. For the gem, my Gemfile contains:
source 'https://rubygems.org'
gemspec
When I ran
gem build program.gemspec
which works 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 as the yaml module is part of the ruby ββ1.9.3 standard library.
I have updated to the latest rubigems (2.4.5).
What am I missing?
source to share
yaml
is part of Ruby. There's no gem there yaml
(see https://rubygems.org/search?query=yaml ).
Therefore remove
s.add_runtime_dependency 'yaml'
from yours gemspec
and just add require 'yaml'
to the file you want to use YAML
.
source to share