-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
gem not running as rvm user? #8951
Comments
I've found it. gem.py (https://github.com/saltstack/salt/blob/develop/salt/modules/gem.py) is calling 'rvm.is_installed' without passing it the user. So if I'm correct Line 16 of that file:
Should be
I've triead to push my branch to origin following the "send pull request" tutorial here (http://docs.saltstack.com/topics/hacking.html) but seems I don't have push permits. Can anyone fix it please? |
Did you fork the repo? You have to have your own fork, then you push your branch to your fork, then open a pull request from that branch. |
(We can also make this fix for you, but we love having new contributors and want to give you credit for finding the bug!) |
Hi there, would that do it? |
Looks good! Did you submit the pull request? |
Ah, found the pull req: #9020. Thanks for doing that! |
Fixes issue #8951 - gem install fails when rvm is set up with another us...
Solved with this pull request: |
I'm having an issue trying to install rvm and unicorn, am I missing something?
I'm getting this error on the minion's log (it's running 0.17.2):
2013-12-02 19:56:14,444 [salt.loaded.int.module.cmdmod][INFO ] Executing command 'gem list unicorn' as user 'rvm' in directory '/home/rvm'
2013-12-02 19:56:14,557 [salt.loaded.int.module.cmdmod][ERROR ] Command 'gem list unicorn' failed with return code: 127
2013-12-02 19:56:14,558 [salt.loaded.int.module.cmdmod][ERROR ] stderr: /bin/sh: 1: gem: not found
2013-12-02 19:56:14,678 [salt.loaded.int.module.cmdmod][INFO ] Executing command 'gem install unicorn --no-rdoc --no-ri' as user 'rvm' in directory '/home/rvm'
2013-12-02 19:56:14,790 [salt.loaded.int.module.cmdmod][ERROR ] Command 'gem install unicorn --no-rdoc --no-ri' failed with return code: 127
2013-12-02 19:56:14,791 [salt.loaded.int.module.cmdmod][ERROR ] stderr: /bin/sh: 1: gem: not found
My unicorn.sls:
unicorn:
gem.installed:
- user: rvm
- runas: rvm
- ruby: ruby-1.9.3
- rdoc: False
- ri: False
- require:
- sls: rvm
My rvm.sls:
rvm:
group:
- present
user.present:
- fullname: rvm
- shell: /bin/bash
- home: /home/rvm
- gid: rvm
- require:
- group: rvm
rvm-deps:
pkg.installed:
- names:
- bash
- coreutils
- gzip
- bzip2
- gawk
- sed
- curl
- git-core
- subversion
mri-deps:
pkg.installed:
- names:
- build-essential
- openssl
- libreadline6
- libreadline6-dev
- curl
- git-core
- zlib1g
- zlib1g-dev
- libssl-dev
- libyaml-dev
- libsqlite3-0
- libsqlite3-dev
- sqlite3
- libxml2-dev
- libxslt1-dev
- autoconf
- libc6-dev
- libncurses5-dev
- automake
- libtool
- bison
- subversion
- ruby
ruby-1.9.3:
rvm.installed:
- default: True
- user: rvm
- require:
- pkg: rvm-deps
- pkg: mri-deps
- user: rvm
mygemset:
rvm.gemset_present:
- ruby: ruby-1.9.3
- user: rvm
- require:
- rvm: ruby-1.9.3
On the minion, if I su as rvm and run:
gem list unicorn
works. Of course it I run it as root it doesn't.
Am I missing something here?
Thanks!
The text was updated successfully, but these errors were encountered: