rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

failed download from bitbucket.org #145

Open kalashnikovisme opened 7 years ago

kalashnikovisme commented 7 years ago

Running role. Have such error.

TASK [rvm_io.ruby : Detect rvm binary] *****************************************
ok: [ruby-virt.simbirsoft]

TASK [rvm_io.ruby : Detect rvm installer] **************************************
ok: [ruby-virt.simbirsoft]

TASK [rvm_io.ruby : Detect current rvm version] ********************************
skipping: [ruby-virt.simbirsoft]

TASK [rvm_io.ruby : Install rvm installer] *************************************
changed: [ruby-virt]

TASK [rvm_io.ruby : Import GPG keys] *******************************************
ok: [ruby-virt]

TASK [rvm_io.ruby : Import GPG keys the other way] *****************************
skipping: [ruby-virt]

TASK [rvm_io.ruby : Install rvm] ***********************************************
fatal: [ruby-virt]: FAILED! => {"changed": true, "cmd": ["/tmp/rvm-installer.sh", "stable", "--path", "~/.rvm", "--auto-dotfiles", "--user-install"], "delta": "0:00:00.046056", "end": "2017-03-07 04:32:30.588085", "failed": true, "rc": 200, "start": "2017-03-07 04:32:30.542029", "stderr": "", "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.\nDownloading https://github.com/rvm/rvm/archive/.tar.gz\n\nCould not download 'https://github.com/rvm/rvm/archive/.tar.gz'.\n  curl returned status '200'.\n\nDownloading https://bitbucket.org/mpapis/rvm/get/.tar.gz\n\nCould not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.\n  curl returned status '200'.", "stdout_lines": ["Turning on auto dotfiles mode.", "Turning on user install mode.", "Downloading https://github.com/rvm/rvm/archive/.tar.gz", "", "Could not download 'https://github.com/rvm/rvm/archive/.tar.gz'.", "  curl returned status '200'.", "", "Downloading https://bitbucket.org/mpapis/rvm/get/.tar.gz", "", "Could not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.", "  curl returned status '200'."], "warnings": []}
jesperrasmussen commented 7 years ago

I got the exact same thing - it seems to me that either the ansible role doesn't pass branch correctly to rvm-installer - or rvm-installer skips it somehow. If you look at the URL https://github.com/rvm/rvm/archive/.tar.gz, I'd expect that to contain master.tar.gz per default :)

jesperrasmussen commented 7 years ago

I figured out my issue, even though it was kinda obscured by the "curl returns 200" error. It turns out I had disabled my base roles, meaning I hadn't ensured curl being present on the system, before attempting to install rvm. The way rvm-installer acts in that case, is actually by giving the "returns 200" error which, to me at least, is a bit confusing. Anyway, @kalashnikovisme - maybe you're having the same issue? Do you have curl installed?

lpaulmp commented 7 years ago

@jesperrasmussen Thanks for your input.

lpaulmp commented 7 years ago

I will try to reproduce this issue on my local

harrykiselev commented 7 years ago

Probably you execute playbook on Ubuntu server. By default Ubuntu doesn't has curl for ruby source download.

First you need sudo apt-get install curl and to re-execute your playbook :)