Skip to content
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

make rvm available system wide/ for all users #12

Open
imewish opened this issue Apr 3, 2017 · 2 comments
Open

make rvm available system wide/ for all users #12

imewish opened this issue Apr 3, 2017 · 2 comments

Comments

@imewish
Copy link

imewish commented Apr 3, 2017

Hello,

can i use the LWRP's of this cookbook to install rvm for all users/ system wide ? is that possible ?

currently its only available for the user we prefer in the LWRP, for eg,

chef_rvm 'ubuntu' do
  rubies ['2.0.0', '2.1.1']
  rvmrc({
    'rvm_autoupdate_flag'=> '1'
  })
end

in this case its available for ubuntu only .

The idea behind system wide is to be able to use ruby with other users than ubuntu.

Helps would be appreciated.

@axelrtgs
Copy link

axelrtgs commented May 9, 2017

You can set ubuntu to any user you like, each user has to source the rvm file into their profile in order for the commands to work and the rubies install per user if my memory servers correctly.

I can look into the possibility of making a system wide rvm available to all users if i find some time between $dayjob and !wife

@imewish
Copy link
Author

imewish commented May 10, 2017

@axelrtgs Thanks for your valuable feed back.

I tried this way to make rvm available for all the users,

chef_rvm 'root' do
  rubies ['2.1','2.3','2.4' ]
  rvmrc({
    'rvm_autoupdate_flag'=> '1',
    'rvm_silence_path_mismatch_check_flag' =>'1'
  })
   action :install
end

and it worked.
Its available for all users except root user.

The only issue i found is, after switching ruby versions , when i look for ruby location it shows like this

ubuntu@ip-10-10-92-242:~$ which ruby
/usr/local/rvm//rubies/ruby-2.4.0/bin/ruby
ubuntu@ip-10-10-92-242:~$ 

an additional / after rvm. But ruby works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants