package { ['ruby193', 'ruby193-ruby-devel', 'ruby193-rubygem-bundler']:
ensure => present,
require => Class['::company_yum::softwarecollections'],
}
# Install Compass for webapp
package { ['sass', 'compass']:
ensure => 'installed',
provider => 'gem',
require => Package['ruby193-ruby-devel'],
}Notice: /Stage[main]/Class_webhost::Silverstripe/Package[ruby193-ruby-devel]/ensure: created
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri compass' returned 1: ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10/ext/ffi_c/gem_make.out
Building native extensions. This could take a while...
Error: /Stage[main]/Class_webhost::Silverstripe/Package[compass]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --no-rdoc --no-ri compass' returned 1: ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10/ext/ffi_c/gem_make.out
Building native extensions. This could take a while...
...
Notice: Finished catalog run in 50.02 seconds
[root@webhost ~]# find /opt/rh/ruby193/root/ -name ruby.h
/opt/rh/ruby193/root/usr/include/ruby/ruby.h
/opt/rh/ruby193/root/usr/include/ruby.h
[root@webhost ~]# exec { 'ruby193_scl_install_blah':
command => "scl enable ruby193 'gem install --bindir /usr/bin --no-rdoc --no-ri blah'",
path => ['/bin','/usr/bin'],
unless => "scl enable ruby193 'gem list'| grep -qs blah"
}