0

newbie here who's been trying to install jekyll on elementary os (5.1.7 Hera) according to this documentation. It all looks good up until I try gem install jekyll bundler at which point I get the following error:

ERROR:  While executing gem ... (NoMethodError)
    undefined method `each' for "A YAML array of remote gem repositories to install gems from":String
    /usr/lib/ruby/2.5.0/rubygems/source_list.rb:73:in `replace'
    /usr/lib/ruby/2.5.0/rubygems/source_list.rb:39:in `from'
    /usr/lib/ruby/2.5.0/rubygems.rb:1001:in `sources'
    /usr/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:58:in `initialize'
    /usr/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:43:in `new'
    /usr/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:43:in `fetcher'
    /usr/lib/ruby/2.5.0/rubygems/resolver/installer_set.rb:38:in `initialize'
    /usr/lib/ruby/2.5.0/rubygems/dependency_installer.rb:445:in `new'
    /usr/lib/ruby/2.5.0/rubygems/dependency_installer.rb:445:in `resolve_dependencies'
    /usr/lib/ruby/2.5.0/rubygems/commands/install_command.rb:194:in `install_gem'
    /usr/lib/ruby/2.5.0/rubygems/commands/install_command.rb:255:in `block in install_gems'
    /usr/lib/ruby/2.5.0/rubygems/commands/install_command.rb:251:in `each'
    /usr/lib/ruby/2.5.0/rubygems/commands/install_command.rb:251:in `install_gems'
    /usr/lib/ruby/2.5.0/rubygems/commands/install_command.rb:158:in `execute'
    /usr/lib/ruby/2.5.0/rubygems/command.rb:313:in `invoke_with_build_args'
    /usr/lib/ruby/2.5.0/rubygems/command_manager.rb:173:in `process_args'
    /usr/lib/ruby/2.5.0/rubygems/command_manager.rb:143:in `run'
    /usr/lib/ruby/2.5.0/rubygems/gem_runner.rb:59:in `run'
    /usr/bin/gem:21:in `<main>'

Anyone know what might be going on here? Anyone had success installing jekyll on elementary os? Please pardon what I guess is a very basic question...

1

I tried to replicate your issue by doing a fresh install of Ruby and Jekyll using the installation instructions you linked. I didn't have the problem you encountered.

That said, I would try the following:

  1. Try gem install jekyll and gem install bundler separately. Does the problem come up in both or just one?
  2. Try uninstalling jekyll and bundler (if installed), clearing your gem paths (as described in the accepted answer here), then reinstalling jekyll and bundler.

Additional Note

Your question appears to be related primarily to Ruby. If your issue persists, I think you might get help more easily by searching or asking on the Stack Overflow site (or a Ruby-specific alternative).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.