Re: puppetdb: how to install using the system ruby 1.9.3-p484

392 views
Skip to first unread message
Message has been deleted
Message has been deleted

machete

unread,
Dec 4, 2013, 2:58:26 PM12/4/13
to puppet...@googlegroups.com
Hey what gives ... ? ;) 

I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet resource package puppetdb ensure=latest' loads ruby 1.8.7 ....

Would someone please point me to the instructions ( or share ) on how to get my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby 1.9.3-p484?

~> ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
~> puppet -V
3.3.2


Cheers,

t

Moses Mendoza

unread,
Dec 4, 2013, 3:22:56 PM12/4/13
to puppet...@googlegroups.com
How did you install puppet originally? Are you running from packages,
rubygem, or running from source, or some other method?
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.



--
Moses Mendoza
Puppet Labs

Join us at PuppetConf 2014, September 23-24 in San Francisco

machete

unread,
Dec 4, 2013, 3:31:26 PM12/4/13
to puppet...@googlegroups.com
Hey Moses,

Thanks for the quick response. 

Puppet was install via ruby gem ... I know, but it is so easy.
Ruby/rubygem are running from source. 
OS is CentOS 6.4 Linux puppetdb 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

machete

unread,
Dec 4, 2013, 3:33:18 PM12/4/13
to puppet...@googlegroups.com
gem list:

gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.3.5)
daemon_controller (1.1.7)
facter (1.7.3)
hiera (1.3.0)
io-console (0.3)
json (1.5.5)
json_pure (1.8.1)
minitest (2.5.1)
passenger (4.0.17)
puppet (3.3.2)
rack (1.5.2)
rake (0.9.2.2)
rdoc (3.9.5)
rgen (0.6.6)

Moses Mendoza

unread,
Dec 4, 2013, 4:51:38 PM12/4/13
to puppet...@googlegroups.com
If you installed puppet originally using ruby 1.8.7, then all of your
gems, including puppet, will be in the ruby 1.8.7 gem home, and all
the binaries, including puppet, that were created by rubygems will be
pointing there. Since you built ruby 1.9.3 from source, perhaps you
have a separate 'gem' executable in $PREFIX/bin ($PREFIX being what
you passed to `configure` ruby) since 1.9.3 ships with rubygems
built-in. Long story short, reinstalling your gems using your new ruby
1.9.3 gem executable will cause the new puppet gem (and all new 1.9.3
rubygems) to use ruby 1.9.3. Note that unless you remove them, your
1.8.7 ruby, rubygems, and all 1.8.7 installed gems will still exist.
> https://groups.google.com/d/msgid/puppet-users/f1c72cad-09f0-4a17-8f92-7f6e09995f46%40googlegroups.com.

machete

unread,
Dec 4, 2013, 5:05:55 PM12/4/13
to puppet...@googlegroups.com
Ok .. thanks ... looks like the linux user is rockin' a different version than root and because I am using root to do the install it ... DOH!  Scary, I thought all the 1.8.7 stuff was gone ... 



User
 gem environment 
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.9.1
     - /home/mongrel/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:

Root
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:

machete

unread,
Jan 21, 2014, 3:13:49 PM1/21/14
to puppet...@googlegroups.com
The 1.8.7 ruby, rubygems and its gems were uninstalled. The root .gem and user .gem directories were also removed.  I am hunting for what I am overlooking.

I am now looking at using the yum package to install puppet. Listed below are the results of the package install. Notice it's trying to install 1.8.7, when my goal is to use the shiny 1.9.3 ...


# sudo yum install puppetLoaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
puppetlabs-deps                                                    | 1.9 kB     00:00     
puppetlabs-deps/primary_db                                         |  21 kB     00:00     
puppetlabs-products                                                | 1.9 kB     00:00     
puppetlabs-products/primary_db                                     | 103 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package puppet.noarch 0:3.4.2-1.el6 set to be updated
--> Processing Dependency: ruby >= 1.8 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: facter >= 1.6.11 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: ruby-rgen >= 0.6.5 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: ruby >= 1.8.7 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: hiera >= 1.0.0 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: ruby-augeas for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: /usr/bin/ruby for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: ruby-shadow for package: puppet-3.4.2-1.el6.noarch
--> Running transaction check
---> Package facter.x86_64 1:1.7.4-1.el6 set to be updated
--> Processing Dependency: virt-what for package: 1:facter-1.7.4-1.el6.x86_64
---> Package hiera.noarch 0:1.3.0-1.el6 set to be updated
--> Processing Dependency: rubygem-json for package: hiera-1.3.0-1.el6.noarch
---> Package ruby.x86_64 0:1.8.7.352-13.el6 set to be updated
--> Processing Dependency: ruby-libs = 1.8.7.352-13.el6 for package: ruby-1.8.7.352-13.el6.x86_64
--> Processing Dependency: libruby.so.1.8()(64bit) for package: ruby-1.8.7.352-13.el6.x86_64
---> Package ruby-augeas.x86_64 0:0.4.1-1.el6 set to be updated
--> Processing Dependency: augeas-libs >= 0.8.0 for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.12.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
---> Package ruby-rgen.noarch 0:0.6.5-1.el6 set to be updated
---> Package ruby-shadow.x86_64 0:1.4.1-13.el6 set to be updated
--> Running transaction check
---> Package augeas-libs.x86_64 0:1.0.0-5.el6_5.1 set to be updated
---> Package ruby-libs.x86_64 0:1.8.7.352-13.el6 set to be updated
---> Package rubygem-json.x86_64 0:1.5.5-1.el6 set to be updated
--> Processing Dependency: rubygems for package: rubygem-json-1.5.5-1.el6.x86_64
---> Package virt-what.x86_64 0:1.11-1.2.el6 set to be updated
--> Running transaction check
---> Package rubygems.noarch 0:1.3.7-5.el6 set to be updated
--> Processing Dependency: ruby-rdoc for package: rubygems-1.3.7-5.el6.noarch
--> Running transaction check
---> Package ruby-rdoc.x86_64 0:1.8.7.352-13.el6 set to be updated
--> Processing Dependency: ruby-irb = 1.8.7.352-13.el6 for package: ruby-rdoc-1.8.7.352-13.el6.x86_64
--> Running transaction check
---> Package ruby-irb.x86_64 0:1.8.7.352-13.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
 Package            Arch         Version                  Repository                 Size
==========================================================================================
Installing:
 puppet             noarch       3.4.2-1.el6              puppetlabs-products       1.1 M
Installing for dependencies:
 facter             x86_64       1:1.7.4-1.el6            puppetlabs-products        87 k
 hiera              noarch       1.3.0-1.el6              puppetlabs-products        23 k
 ruby               x86_64       1.8.7.352-13.el6         updates                   534 k
 ruby-augeas        x86_64       0.4.1-1.el6              epel                       21 k
 ruby-irb           x86_64       1.8.7.352-13.el6         updates                   314 k
 ruby-libs          x86_64       1.8.7.352-13.el6         updates                   1.6 M
 ruby-rdoc          x86_64       1.8.7.352-13.el6         updates                   377 k
 ruby-rgen          noarch       0.6.5-1.el6              puppetlabs-deps            87 k
 ruby-shadow        x86_64       1.4.1-13.el6             epel                       11 k
 rubygem-json       x86_64       1.5.5-1.el6              puppetlabs-deps           763 k
 rubygems           noarch       1.3.7-5.el6              base                      207 k
 virt-what          x86_64       1.11-1.2.el6             base                       24 k
Updating for dependencies:
 augeas-libs        x86_64       1.0.0-5.el6_5.1          updates                   309 k
...



here are the gem environment details...

 #  gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.9.1
     - /root/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:


Any ideas what I am missing?

I guess I should start looking for what puppet yum package install uses to figure out the ruby dependency?

machete

unread,
Jan 21, 2014, 3:14:36 PM1/21/14
to puppet...@googlegroups.com

Cory Stoker

unread,
Jan 21, 2014, 6:47:42 PM1/21/14
to puppet...@googlegroups.com
So how did you install Ruby 1.9.3? Did you create your own RPM or use
something else? The RPM packages for puppet will have dependencies
and then yum will try to satisfy them by looking in it's configured
yum repositories. It usually tries to find the latest version.
Looking at your output it looks like none of the Ruby dependencies
were installed so yum find versions for you. For example these 2 are
looking for a Ruby greater than 1.8 installed and a file called
/usr/bin/ruby:
--> Processing Dependency: ruby >= 1.8 for package: puppet-3.4.2-1.el6.noarch
--> Processing Dependency: /usr/bin/ruby for package: puppet-3.4.2-1.el6.noarch

Since neither were found in the RPM DB it installed Ruby 1.8.7 for you.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/206cc745-4d08-49e2-976b-ef6095126806%40googlegroups.com.

machete

unread,
Jan 22, 2014, 8:14:57 AM1/22/14
to puppet...@googlegroups.com
Cory thanks for the response.

Ruby (1.9.3-484 with rails-express patch) was compiled/installed with bash script ( aka something else).  

While the most current ruby binary is in /usr/bin, yum/RPM must need additional stuff ( maybe that RPM DB entry you mentioned ). Ultimately,  I could see the moving the ruby to a RPM and letting puppet take care of that. Before that,  I've should figure out how to satisfy the yum/rpm dependency(s). Maybe get the entry(s) to RPM DB?



most current in /usr/bin


Thanks again,

You've given me direction! ...  
...
-rwxr-xr-x    1 root root    8114512 Jan 22 04:02 ruby
-rwxr-xr-x    1 root root        548 Jan 22 04:02 gem

# ./ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

Reply all
Reply to author
Forward
0 new messages