-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rvm not found? #88
Comments
You're using If you were to use |
I see ... This would rule out calling "rvm use" directly from the playbook.
If you were to use rvm use ..., and actually get it to work, then RVM would set everything up in that instance of the shell -- in other words, for that one process. Then the shell exits, and everything is back to how it was. You can see if you use ansible-playbook -vvvv how very separate each play is! — |
I use Capistrano and Ansible. As you know, they're separate tools, but naturally they work together. Personally, I would completely separate upgrading Ruby from rolling out the new version of your application. I would modify your Ansible script first to install the new Ruby version:
That sets the last one as the default. You may want to be more explicit about this. I have my Passenger configured to use
The existing workers in memory will use the "old" version of Ruby. You didn't mention which application server you use, but I usually use Passenger (currently I'm using 5). In the configuration (it's actually in Thoughts? |
The key is your point about the existing workers using the previous version until you restart the app server. I had not thought about that. That will work for me, it will minimize downtime. On Mon, Mar 28, 2016 at 6:16 PM, Liamnotifications@github.com wrote:
That sets the last one as the default. You may want to be more explicit about this. I have my Passenger configured to use /usr/local/bin/ruby which is where the system-wide RVM "installs ruby"... but it's really just a symlink to a script: if The existing workers in memory will use the "old" version of Ruby. You didn't mention which application server you use, but I usually use Passenger (currently I'm using 5). In the configuration (it's actually in nginx.conf), I have it pointed at the file above (/usr/local/bin/ruby). By restarting the app server, now suddenly they're all on the new version of Ruby, assuming I installed the new version as the default. Thoughts? — |
@jrodrigosm Did you fix this issue? |
I've run into the same issue and gotten around the problem by explicitly running the bash command for rvm commands. I suppose you could also use the full path to rvm but I think that the following is a better option. - name: Set ruby default
shell: 'bash -lc "rvm use 2.3.1 --default"' |
Hi,
I'm finding a strange behaviour after installing rvm: the rvm command is not found.
I am running the following playbook to install rvm, install a couple of ruby versions, and, after installation, check that rvm has been installed by printing the rvm version:
The installation goes smoothly, but I get an error when running the rvm command:
I thought the issue could be that I was using the "command" module to run rvm. I then switched to the "shell" module but I still get an error:
Any ideas? Why could this be happening?
(If you wonder about my use case: I want to run a play to change the ruby version; as such, I want to run
command: rvm use 2.2.1
- but I can't, because rvm is not found)I'm running the playbook with ansible 2.0.1.0, rvm_io.rvm1-ruby v1.3.7 and both machines (control and target) are running Debian 8.
The text was updated successfully, but these errors were encountered: