rvm / rvm1-ansible

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

Problem adding new gemset #69

Open anquegi opened 8 years ago

anquegi commented 8 years ago

Thanks for this role, I suppose that I'm doing something wrong, the role is well installed and rvm works, when I ssh to the machine.

I can also install a ruby inside the playbook:

The problem is when I try to create a gemset:

Give always the same warning as a result the gemset is not installed:

changed: [172.17.8.150] => {"changed": true, "cmd": "/usr/local/rvm/bin/rvm use 2.1.6@antifraud-gemset --create --default", "delta": "0:00:00.170817", "end": "2015-11-06 12:09:09.339580", "rc": 0, "start": "2015-11-06 12:09:09.168763", "stderr": "RVM is not a function, selecting rubies with 'rvm use ...' will not work.\n\nYou need to change your terminal emulator preferences to allow login shell.\nSometimes it is required to use /bin/bash --login as the command.\nPlease visit https://rvm.io/integration/gnome-terminal/ for an example.", "stdout": "", "warnings": []}

nickjj commented 8 years ago

Did you follow the link it mentions to visit?

anquegi commented 8 years ago

Hi nickjj,

Yes I tried all of that, and nothing works I cannot create a gemset from ansible scripts

nickjj commented 8 years ago

Hmm. I've never used gemsets before but this looks like a more generic error.

I'm guessing it works when you SSH into the server manually and create it?

tjad commented 8 years ago

Hi Nick,

I've run into the same problem - I haven't gone into further diagnoses as of yet, but when I do will add more information. Just noting that this is an actual issue (seems to have to do with permissions at first glance)

tjad commented 8 years ago

Ah ok,

So I figured that due to a permissions error I would check the groups of my active user (the user I'm using for the command). They were not present within the rvm group.

After adding the user to the rvm group, all is well.

UPDATE: Note that this is for manual creation and not via ansible... I will do an ansible test soon as I was unable to do this via ansible previously.

tjad commented 8 years ago

Ok, so adding rvm group to my active user certainly worked - I don't know why as I've used the raised privileges (become). But it works. it all works nicely.

Thanks a lot for your work!

meetme2meat commented 7 years ago

@tjad can you please explain your approach. I'm getting the same error.