0
votes
gem list -r ra 

=> * REMOTE GEMS * but no gems appear

gem list 

=> (my installed gems)

ruby -v 

=> ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

gem -v 

=> 2.7.3

gem environment

RubyGems Environment:

  • RUBYGEMS VERSION: 2.7.3
  • RUBY VERSION: 2.5.0 (2017-12-25 patchlevel 0) [x86_64-linux]
  • INSTALLATION DIRECTORY: /home/xxx/.gem/ruby/2.5.0
  • USER INSTALLATION DIRECTORY: /home/xxx/.gem/ruby/2.5.0
  • RUBY EXECUTABLE: /usr/local/rubies/2.5.0/bin/ruby
  • EXECUTABLE DIRECTORY: /home/xxx/.gem/ruby/2.5.0/bin
  • SPEC CACHE DIRECTORY: /home/xxx/.gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: /usr/local/rubies/2.5.0/etc
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:

    • /home/xxx/.gem/ruby/2.5.0
    • /usr/local/rubies/2.5.0/lib/ruby/gems/2.5.0
  • GEM CONFIGURATION:

    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • "gem" => "--no-document"
  • REMOTE SOURCES:

  • SHELL PATH:

    • /home/xxx/.gem/ruby/2.5.0/bin
    • /usr/local/rubies/2.5.0/lib/ruby/gems/2.5.0/bin
    • /usr/local/rubies/2.5.0/bin
    • /home/xxx/.nvm/versions/node/v8.8.1/bin
    • /usr/local/heroku/bin
    • /home/xxx/commands
    • /home/xxx/bin
    • /usr/local/sbin
    • /usr/local/bin
    • /usr/sbin
    • /usr/bin
    • /sbin
    • /bin
    • /usr/games
    • /usr/local/games
    • /snap/bin

I haven't changed anything (that I'm aware of) in my ruby since when it did work. Any suggestions on where to look?

1
can't install any gems. Example: gem install rubyfann-1.2.6 ERROR: Could not find a valid gem 'rubyfann-1.2.6' (>= 0), here is why: Unable to download data from rubygems.org - timed out (api.rubygems.org/specs.4.8.gz) changed my .gemrc --- :backtrace: false :bulk_threshold: 1000 :sources: - rubygems.org :update_sources: true :verbose: true benchmark: false gem: "--no-rdoc --no-ri" gem list -r ^rails still empty uninstalled ruby. Reinstalled with ruby 2.5.1 - same problemThomas L. Lucero

1 Answers

0
votes

well looks like you have no sources. see in gem env "gem" => "--no-document"

try running this:

gem sources -a https://rubygems.org/

my env differs by:

- GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["https://rubygems.org/"]
     - "benchmark" => false
     - "gem" => "--no-rdoc --no-ri"

can you paste output of ~/.gemrc to make sure? Mine looks like:

---
:backtrace: false
:bulk_threshold: 1000
:sources:
- https://rubygems.org/
:update_sources: true
:verbose: true
benchmark: false
gem: "--no-rdoc --no-ri"

If this doesn't work, perhaps try installing ruby using rvm https://rvm.io/rvm/install