8

I wanna export xlsx excel file using ruby in ROR so i'm install rubyXL. i use this command: sudo gem install rubyXL --source http://rubygems.org and then it have error like below

ERROR:  Could not find a valid gem 'rubyXL' (>= 0), here is why:
          Unable to download data from http://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)

Please help me

Ma YongChhin
  • 427
  • 3
  • 10
  • 24

4 Answers4

6

Disabling ipv6 solved the issue for me:

https://www.configserverfirewall.com/ubuntu-linux/ubuntu-disable-ipv6/

atomiczap
  • 91
  • 2
  • 3
  • I was having this issue on mac and this worked for me, I used the Terminal to disable ipv6 temporarily: **Disable** `networksetup -setv6off Ethernet && networksetup -setv6off Wi-Fi` - **Enable**: `networksetup -setv6automatic Wi-Fi && networksetup -setv6automatic Ethernet` – polloss Mar 14 '23 at 16:28
3

Specify the source with the command,

    gem install <gem_name> --source http://rubygems.org
0

Try to update rubygems and try again.

gem update --system
osman
  • 2,335
  • 18
  • 25
-1

Rebooting my laptop solved the issue for me.

Florent
  • 1
  • 1
  • If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/33846486) – tooba Feb 20 '23 at 19:27