-
Notifications
You must be signed in to change notification settings - Fork 9
Install from source fails #2
Comments
Tested on an a clean vagrant box (without native ruby packages installed) it worked well. root@ubuntu1204-64:~# ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] root@ubuntu1204-64:~# which ruby /opt/vagrant_ruby/bin/ruby after an apt-get install ruby: root@ubuntu1204-64:~# ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] root@ubuntu1204-64:~# which ruby /usr/bin/ruby after a vagrant provision with this code: class { 'ruby': version => '1.9.3-p392', compile_from_source => true, } I saw this output: Macante:example42-test al$ vagrant provision Ubuntu1204_64 [Ubuntu1204_64] Running provisioner: puppet... Running Puppet with init.pp... stdin: is not a tty info: Loading facts in /tmp/vagrant-puppet/modules-0/concat/lib/facter/concat_basedir.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/php/lib/facter/php_fact_extension_dir.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/php/lib/facter/php_fact_version.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetdb/lib/facter/puppetdbversion.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/last_run.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/puppi_projects.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/rvm/lib/facter/rvm_installed.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/facter_dot_d.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/pe_version.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/puppet_vardir.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/root_home.rb info: Applying configuration version '1380050715' notice: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[/root/puppi_install_packages]/ensure: created notice: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]/ensure: created info: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/File[install_packages_ruby_compile_prerequisites]: Scheduling refresh of Exec[install_packages_ruby_compile_prerequisites] err: /Stage[main]/Ruby::Compile/Puppi::Install_packages[ruby_compile_prerequisites]/Exec[install_packages_ruby_compile_prerequisites]: Failed to call refresh: Command exceeded timeout at /tmp/vagrant-puppet/modules-0/puppi/manifests/install_packages.pp:79 notice: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Retrieve http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.zip in /var/tmp]/returns: executed successfully notice: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Extract ruby-1.9.3-p392.zip from /var/tmp]/returns: executed successfully info: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Extract ruby-1.9.3-p392.zip from /var/tmp]: Scheduling refresh of Exec[PostExtract ruby-1.9.3-p392.zip in /var/tmp] info: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Extract ruby-1.9.3-p392.zip from /var/tmp]: Scheduling refresh of Exec[Chown ruby-1.9.3-p392.zip in /var/tmp] notice: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[PostExtract ruby-1.9.3-p392.zip in /var/tmp]: Triggered 'refresh' from 1 events notice: /Stage[main]/Ruby::Compile/Puppi::Netinstall[ruby_source]/Exec[Chown ruby-1.9.3-p392.zip in /var/tmp]: Triggered 'refresh' from 1 events notice: Finished catalog run in 628.91 seconds The timeout during the prerequisites installation didn't seem to be blocking, this is the result after this run: root@ubuntu1204-64:~# ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] root@ubuntu1204-64:~# which ruby /usr/local/bin/ruby root@ubuntu1204-64:~# /usr/local/bin/ruby -v ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux] root@ubuntu1204-64:~# /opt/vagrant_ruby/bin/ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] root@ubuntu1204-64:~# /usr/bin/ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] root@ubuntu1204-64:~# /usr/bin/ruby1.8 -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] root@ubuntu1204-64:~# /usr/local/bin/ruby -v ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux] So, when compiling from source the ruby binary is placed in /usr/local/bin, and you use it instead of the system's one according to your $PATH. To me this seems a correct behaviour (I'd not overwrite /usr/bin/ruby ), but if you have remarks or suggestions let me know. |
This does seem like the correct behavior. I think this information should be added to the documentation. |
Can you make a pull request of https://github.com/spudstud/puppet-ruby/commit/2b55534ac221d4c3f96736c9a4181f9753d2bb2f ? |
Problem: Attempting to install ruby version from source results in the same ruby version before the module was run.
Notice that 1.8.7 is the version before and after the puppet run.
The text was updated successfully, but these errors were encountered: