rvm / rvm1-ansible

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

patch number must be included in rvm1_rubies? #67

Open ruudgrosmann opened 8 years ago

ruudgrosmann commented 8 years ago

While trying to install rvm for a local user with ansible, I get an error message.

output: TASK: [rvm_io.rvm1-ruby | Install rubies] ***** changed: [172.22.25.227] => (item={u'cmd': [u'/home/archief/.rvm/bin/rvm', u'ruby-1.9.3', u'do', u'true'], u'end': u'2015-10-21 10:04:29.900201', u'stderr': u'Ruby ruby-1.9.3-p551 is not installed.', u'stdout': u'', u'changed': False, u'rc': 2, 'failed': False, 'item': 'ruby-1.9.3', u'delta': u'0:00:00.253186', 'invocation': {'module_name': u'command', 'module_args': u'/home/archief/.rvm/bin/rvm ruby-1.9.3 do true'}, 'stdout_lines': [], 'failed_when_result': False, u'start': u'2015-10-21 10:04:29.647015'})

TASK: [rvm_io.rvm1-ruby | Detect default ruby version] **** ok: [172.22.25.227]

TASK: [rvm_io.rvm1-ruby | Select default ruby] **** changed: [172.22.25.227]

TASK: [rvm_io.rvm1-ruby | Install bundler if not installed] *** failed: [172.22.25.227] => (item=ruby-1.9.3) => {"changed": false, "cmd": "/home/archief/.rvm/wrappers/ruby-1.9.3/gem list | if ! grep \"^bundler \" ; then /home/archief/.rvm/wrappers/ruby-1.9.3/gem install bundler ; fi", "delta": "0:00:00.003083", "end": "2015-10-21 10:04:48.582447", "item": "ruby-1.9.3", "rc": 127, "start": "2015-10-21 10:04:48.579364", "stdout_lines": []} stderr: /bin/sh: 1: /home/archief/.rvm/wrappers/ruby-1.9.3/gem: not found /bin/sh: 1: /home/archief/.rvm/wrappers/ruby-1.9.3/gem: not found

FATAL: all hosts have already failed -- aborting

The reason that the gem executable is not found, is that the install task has installed it in wrappers/ruby-1.9.3@p551. So I assume it is going to work when I change rvm1_rubies: 'ruby-1.9.3' to rvm1_rubies: 'ruby-1.9.3@p551'. But is this the way it is supposed to work? In examples, I see nowhere a mention of the patch number. Or should I fix this in another way?

regards, ruud

Seraf commented 8 years ago

Hello,

Same problem here. I :+1: patches shouldn't be an issue to find the path and shouldn't be specified in the yaml

taichiman commented 8 years ago

Thanks @ruudgrosmann , your good idea works. Ruby 1.9.3 has been insalled.