Where did ruby go after using the rbenv cookbook?

Hi,

I am kinda new to ruby and def new to hte rbenv cookbook from the
supermarket and wow…just wondering how it works…I mean…where did ruby
go?? I am on ubuntu 14.04.

Below is my recipe and I added depends ‘rbenv’ in my cookbook for
installing ruby.

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"
include_recipe "rbenv::rbenv_vars"
rbenv_ruby “2.1.5”

rbenv_gem “rails” do
ruby_version "2.1.5"
end

One would think I would have ruby my server but I dont so I think

I type rbenv into the shell I get the below.

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

If this cookbook does not work is there another one that does work? Is
there missing documentation for the cookbook?

https://supermarket.chef.io/cookbooks/rbenv/versions/1.4.1

Below is lastest chef run

  • group[rbenv] action create (up to date)
    • user[rbenv] action create (up to date)
    • directory[/opt/rbenv] action create (up to date)
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
    • template[/etc/profile.d/rbenv.sh] action create (up to date)
    • ruby_block[initialize_rbenv] action nothing (skipped due to action
      :nothing)
    • directory[/opt/rbenv/shims] action create (up to date)
    • directory[/opt/rbenv/versions] action create (up to date)
    • directory[/opt/rbenv/plugins] action create (up to date)
      Recipe: rbenv::ruby_build
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/ruby_build] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: rbenv::rbenv_vars
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/rbenv-vars] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: ruby::default
    • rbenv_ruby[2.1.5] action install (up to date)
      Recipe: ruby::rails
    • rbenv_gem[rails] action install
      • install version 4.2.0 of package rails

$ which ruby
$ source /etc/profile.d/rbenv.sh
$ which ruby

rbenv installs system-wide. It might not be being sourced by your user
shell, or profile. the cookbook may actually manage particular users
specifically, so maybe that is something to check.

what are the contents of /etc/profile.d/rbenv.sh? in your interactive
shell, do you source the contents of profile.d?

gist me the output of find /opt/rbenv. I have a feeling "that is where
ruby went"

cheers,

--aj

On Tue, Dec 23, 2014 at 6:53 PM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

I am kinda new to ruby and def new to hte rbenv cookbook from the
supermarket and wow...just wondering how it works...I mean..where did ruby
go?? I am on ubuntu 14.04.

Below is my recipe and I added depends 'rbenv' in my cookbook for installing
ruby.

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"
include_recipe "rbenv::rbenv_vars"
rbenv_ruby "2.1.5"

rbenv_gem "rails" do
ruby_version "2.1.5"
end

One would think I would have ruby my server but I dont so I think

I type rbenv into the shell I get the below.

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

If this cookbook does not work is there another one that does work? Is
there missing documentation for the cookbook?

rbenv Cookbook - Chef Supermarket

Below is lastest chef run

  • group[rbenv] action create (up to date)
    • user[rbenv] action create (up to date)
    • directory[/opt/rbenv] action create (up to date)
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
    • template[/etc/profile.d/rbenv.sh] action create (up to date)
    • ruby_block[initialize_rbenv] action nothing (skipped due to action
      :nothing)
    • directory[/opt/rbenv/shims] action create (up to date)
    • directory[/opt/rbenv/versions] action create (up to date)
    • directory[/opt/rbenv/plugins] action create (up to date)
      Recipe: rbenv::ruby_build
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/ruby_build] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: rbenv::rbenv_vars
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/rbenv-vars] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: ruby::default
    • rbenv_ruby[2.1.5] action install (up to date)
      Recipe: ruby::rails
    • rbenv_gem[rails] action install
      • install version 4.2.0 of package rails

wow..that did it. Yay..it works. Thanks

On Tue, Dec 23, 2014 at 1:06 PM, AJ Christensen <aj@junglistheavy.industries

wrote:

$ which ruby
$ source /etc/profile.d/rbenv.sh
$ which ruby

rbenv installs system-wide. It might not be being sourced by your user
shell, or profile. the cookbook may actually manage particular users
specifically, so maybe that is something to check.

what are the contents of /etc/profile.d/rbenv.sh? in your interactive
shell, do you source the contents of profile.d?

gist me the output of find /opt/rbenv. I have a feeling "that is where
ruby went"

cheers,

--aj

On Tue, Dec 23, 2014 at 6:53 PM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

I am kinda new to ruby and def new to hte rbenv cookbook from the
supermarket and wow...just wondering how it works...I mean..where did
ruby
go?? I am on ubuntu 14.04.

Below is my recipe and I added depends 'rbenv' in my cookbook for
installing
ruby.

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"
include_recipe "rbenv::rbenv_vars"
rbenv_ruby "2.1.5"

rbenv_gem "rails" do
ruby_version "2.1.5"
end

One would think I would have ruby my server but I dont so I think

I type rbenv into the shell I get the below.

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

If this cookbook does not work is there another one that does work? Is
there missing documentation for the cookbook?

rbenv Cookbook - Chef Supermarket

Below is lastest chef run

  • group[rbenv] action create (up to date)
    • user[rbenv] action create (up to date)
    • directory[/opt/rbenv] action create (up to date)
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
    • template[/etc/profile.d/rbenv.sh] action create (up to date)
    • ruby_block[initialize_rbenv] action nothing (skipped due to action
      :nothing)
    • directory[/opt/rbenv/shims] action create (up to date)
    • directory[/opt/rbenv/versions] action create (up to date)
    • directory[/opt/rbenv/plugins] action create (up to date)
      Recipe: rbenv::ruby_build
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/ruby_build] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: rbenv::rbenv_vars
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/rbenv-vars] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: ruby::default
    • rbenv_ruby[2.1.5] action install (up to date)
      Recipe: ruby::rails
    • rbenv_gem[rails] action install
      • install version 4.2.0 of package rails

Hi,

Why is it that every time I log into the shell i have to run source
/etc/profile.d/rbenv.sh? Else I get rbenv not found. How d I automate
this? I was under the impression the cookbook would do this for you.

rbenv versions
The program 'rbenv' is currently not installed. You can install it by
typing:
apt-get install rbenv
root@aws-ruby-east-development-20141223090416:/home/ubuntu# source
/etc/profile.d/rbenv.sh
root@aws-ruby-east-development-20141223090416:/home/ubuntu# rbenv versions

  • 2.1.5 (set by /opt/rbenv/version)

On Tue, Dec 23, 2014 at 1:14 PM, David Montgomery <davidmontgomery@gmail.com

wrote:

wow..that did it. Yay..it works. Thanks

On Tue, Dec 23, 2014 at 1:06 PM, AJ Christensen <
aj@junglistheavy.industries> wrote:

$ which ruby
$ source /etc/profile.d/rbenv.sh
$ which ruby

rbenv installs system-wide. It might not be being sourced by your user
shell, or profile. the cookbook may actually manage particular users
specifically, so maybe that is something to check.

what are the contents of /etc/profile.d/rbenv.sh? in your interactive
shell, do you source the contents of profile.d?

gist me the output of find /opt/rbenv. I have a feeling "that is where
ruby went"

cheers,

--aj

On Tue, Dec 23, 2014 at 6:53 PM, David Montgomery
davidmontgomery@gmail.com wrote:

Hi,

I am kinda new to ruby and def new to hte rbenv cookbook from the
supermarket and wow...just wondering how it works...I mean..where did
ruby
go?? I am on ubuntu 14.04.

Below is my recipe and I added depends 'rbenv' in my cookbook for
installing
ruby.

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"
include_recipe "rbenv::rbenv_vars"
rbenv_ruby "2.1.5"

rbenv_gem "rails" do
ruby_version "2.1.5"
end

One would think I would have ruby my server but I dont so I think

I type rbenv into the shell I get the below.

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

If this cookbook does not work is there another one that does work? Is
there missing documentation for the cookbook?

rbenv Cookbook - Chef Supermarket

Below is lastest chef run

  • group[rbenv] action create (up to date)
    • user[rbenv] action create (up to date)
    • directory[/opt/rbenv] action create (up to date)
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
    • template[/etc/profile.d/rbenv.sh] action create (up to date)
    • ruby_block[initialize_rbenv] action nothing (skipped due to action
      :nothing)
    • directory[/opt/rbenv/shims] action create (up to date)
    • directory[/opt/rbenv/versions] action create (up to date)
    • directory[/opt/rbenv/plugins] action create (up to date)
      Recipe: rbenv::ruby_build
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/ruby_build] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: rbenv::rbenv_vars
    • ruby_block[set HOME for rbenv at 1419313042] action run
      • execute the ruby block set HOME for rbenv at 1419313042
    • git[/opt/rbenv/plugins/rbenv-vars] action sync (up to date)
    • ruby_block[unset HOME for rbenv 1419313042] action run
      • execute the ruby block unset HOME for rbenv 1419313042
        Recipe: ruby::default
    • rbenv_ruby[2.1.5] action install (up to date)
      Recipe: ruby::rails
    • rbenv_gem[rails] action install
      • install version 4.2.0 of package rails

Just add the second command that AJ gave you to your login shells reconfigure file.
(i.e. ~/.bashrc)

Good luck,

Christopher

On Dec 22, 2014, at 10:06 PM, AJ Christensen aj@junglistheavy.industries wrote:

rbenv installs system-wide. It might not be being sourced by your user
shell, or profile. the cookbook may actually manage particular users
specifically, so maybe that is something to check.