In a CentOS container, I am trying to get the SASS to execute from PHP's exec()
. SASS is executable, I can execute the command successfully from inside the container manually, but not from the PHP.
Command I am trying is:
PHP
$command = '/usr/local/bin/sass ' . $webFolderPath . '/styles/style_303.scss' . ' ' . $webFolderPath . '/styles/style_303.css';
$command .= " 2>&1";
echo $command;
exec($command, $output, $return);
Translates to:
/usr/local/bin/sass /var/www/html/portal/web/styles/style_303.scss /var/www/html/portal/web/styles/style_303.css 2>&1
I get the following error.
/usr/share/rubygems/rubygems/path_support.rb:68:in `path=': undefined method `+' for nil:NilClass (NoMethodError)
from /usr/share/rubygems/rubygems/path_support.rb:30:in `initialize'
from /usr/share/rubygems/rubygems.rb:357:in `new'
from /usr/share/rubygems/rubygems.rb:357:in `paths'
from /usr/share/rubygems/rubygems.rb:379:in `path'
from /usr/share/rubygems/rubygems/specification.rb:794:in `dirs'
from /usr/share/rubygems/rubygems/specification.rb:658:in `each_normal'
from /usr/share/rubygems/rubygems/specification.rb:669:in `_all'
from /usr/share/rubygems/rubygems/specification.rb:822:in `each'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find_inactive_by_path'
from /usr/share/rubygems/rubygems.rb:175:in `try_activate'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
from <internal:abrt_prelude>:2:in `<compiled>'
Versions:
Sass: 3.5.4 (Bleeding Edge)
Ruby: 2.0.0p648 (2015-12-16) [x86_64-linux]
Gem: 2.0.14.1
CentOS: 7
Any idea, if I am missing something?
php-fpm
from another container (the web service)