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

Rbenv only installed for vagrant user #84

Open
lserman opened this issue Jan 10, 2014 · 2 comments
Open

Rbenv only installed for vagrant user #84

lserman opened this issue Jan 10, 2014 · 2 comments

Comments

@lserman
Copy link

lserman commented Jan 10, 2014

Hello,

My cookbook creates an apps user that I want to use for Rails deployment. I'm testing my recipe with Vagrant using this JSON:

chef.json = {
  app: {
    name: "test",
    rubies: ['2.0.0-p353']
  },
  rbenv: {
    user: "apps",
    group: "rbenv"
  }
}

I want to use the apps user for Rails deployment on my server. When I start vagrant though, only the vagrant user has access to rbenv. The apps user exists but receives

The program 'rbenv' is currently not installed.  You can install it by typing:
sudo apt-get install rbenv

It looks like rbenv is not being added to the $PATH like it is for the default vagrant user. How do I install rbenv for my apps user? I'd prefer not to have to edit $PATH myself. Here is the rbenv portion of my recipe (apps is created before this point):

# Rbenv
include_recipe 'rbenv::default'
include_recipe 'rbenv::ruby_build'

node.app.rubies.each do |rb|
  rbenv_ruby(rb)
  rbenv_gem('bundler') { ruby_version rb }
end
@leonelgalan
Copy link

I'm wondering the same thing, I also tried to set the ruby version to be global rbenv_ruby(rb) { global true }, but this is on a per user basis and only vagrant is getting it.

@valachi
Copy link

valachi commented Sep 22, 2014

haven't tried it myself, but i guess that you should add rbenv users to the rbenv group or make a ruby installation global

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

3 participants