rvm / rvm1-ansible

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

Symlink to bundler not working #73

Open titib opened 8 years ago

titib commented 8 years ago

Version : master branch

After the installation of Bundler, in the step "Symlink ruby related binaries on the system path", the symlink to bundler failed.

TASK: [rvm_io.rvm1-ruby | Symlink ruby related binaries on the system path] ***
<10.0.2.5> ESTABLISH CONNECTION FOR USER: banh
<10.0.2.5> REMOTE_MODULE file owner=root group=root state=link src=/usr/local/rvm/wrappers/default/bundle dest=/usr/local/bin/bundle
<10.0.2.5> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/banh/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 10.0.2.5 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466 && echo $HOME/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466'
<10.0.2.5> PUT /tmp/tmpQ3V4xk TO /home/banh/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466/file
<10.0.2.5> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/banh/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 10.0.2.5 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=dkhrqaqlplibpeuyewqyzcdnidafpcgt] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-dkhrqaqlplibpeuyewqyzcdnidafpcgt; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/banh/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466/file; rm -rf /home/banh/.ansible/tmp/ansible-tmp-1448118244.89-227309662469466/ >/dev/null 2>&1'"'"''
failed: [10.0.2.5] => (item=bundle) => {"failed": true, "item": "bundle", "path": "/usr/local/bin/bundle", "src": "/usr/local/rvm/wrappers/default/bundle", "state": "absent"}
msg: src file does not exist, use "force=yes" if you really want to create the link: /usr/local/rvm/wrappers/default/bundle
Heliosmaster commented 8 years ago

I was installing ruby-2.1.2 and noticed that the /usr/local/rvm/wrappers/default was simlinked to ruby 2.2.1 instead of ruby 2.1.2

viruzzo commented 7 years ago

Since it's already open: make sure you defines rvm1_rubies as a list, otherwise the role installs it correctly but the fails to symlink to the default version. Example: - { role: rvm_io.rvm1-ruby, rvm1_rubies: [ ruby-2.1.1 ], become: True }.

Toshakins commented 7 years ago

Experienced the same issue, @viruzzo answer helped me. Many thanks, sir 🎩

I think that issue could be closed.