I have this code:
pasver = `/usr/local/rvm/bin/gem list | grep passenger`.sub /.*\((.*)\).*/, '\1'.chomp
if ! ::File.exists?("/usr/local/rvm/gems/#{node['redmine']['rubyversion']}/gems/passenger-#{pasver.chomp!}/buildout/apache2/mod_passenger.so") then
bash "build_and_install_passenger_module_for_apache" do
user "root"
code <<-EOH
source /etc/profile.d/rvm.sh
/usr/local/rvm/gems/#{node['redmine']['rubyversion']}/bin/passenger-install-apache2-module -a
EOH
end
end
And a problem is that "/usr/local/rvm/gems/#{node['redmine']['rubyversion']}/gems/passenger-#{pasver.chomp!}/buildout/apache2/mod_passenger.so" if a two lines string variable
Why this happens ?
I have second use case in other (erb) file:
<% pasver = `/usr/local/rvm/bin/gem list | grep passenger`.sub /.*\((.*)\).*/, '\1'.chomp %>
PassengerRoot <%= "/usr/local/rvm/gems/#{node['redmine']['rubyversion']}/gems/passenger-#{pasver.chomp!}" %>
PassengerDefaultRuby /usr/local/rvm/wrappers/<%= node['redmine']['rubyversion']%>/ruby
This file generates:
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19
/buildout/apache2/mod_passenger.so
Why ?
Where does the new line symbol is ?
Archive powered by MHonArc 2.6.16.