PHP致命错误:找不到类'SassParser'

时间:2015-07-19 20:42:17

标签: php drupal-7 sass

我刚刚为Drupal 7.x安装了peroxide HAML / SASS引擎及其oxygen主题,已激活且设置为默认,然后提供了chmod -R 777 sites/all只是为了确保我没有得到任何rwx错误。 我安装了 sass (ruby gem版本)(在sass: /usr/local/bin/sass /home/danthe/.rvm/gems/ruby-2.2.1/bin/sass

我现在看到一个空白页面,甚至无法登录管理面板,一切都是空白的(导致PHP致命错误)。

我的log

[Sun Jul 19 21:14:19.607260 2015] [:error] [pid 2507] [client 127.0.0.1:42531] PHP Fatal error:  Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
sh: 1: sass: not found
[Sun Jul 19 21:14:19.656532 2015] [:error] [pid 1424] [client 127.0.0.1:42532] PHP Fatal error:  Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
[Sun Jul 19 21:14:19.740176 2015] [:error] [pid 2506] [client 127.0.0.1:42533] PHP Fatal error:  Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186
[Sun Jul 19 21:14:19.815207 2015] [:error] [pid 1427] [client 127.0.0.1:42534] PHP Fatal error:  Class 'SassParser' not found in /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/peroxide.engine on line 186

这是我在第186行的../peroxine.engine

  // Setup the Sass Parser
  $options = _peroxide_get_sass_options($theme);
  $parser = new SassParser($options);

1 个答案:

答案 0 :(得分:1)

peroxide不依赖于完全Ruby版本的SASS编译器,它只能编译Ruby版本的编译器。您必须按递归方式使用引擎克隆存储库,如Installation guide中所述。

Peroxide使用phamlp作为SASS编译器,它被指定为Peroxide存储库的Git子模块。

cd sites/all/themes (or whatever your theme directory is)
mkdir engines
cd engines
git clone --recursive git://github.com/codeincarnate/peroxide.git

您所拥有的错误不是由权限引起的,而是peroxide.engine#L186中的php中的致命错误

PHP脚本无法创建SassParser对象的新实例,该实例在/phamlp/blob/master/sass/SassParser.php中定义

请确保该文件夹存在并包含phamlp源代码。 /home/danthe/public_html/AtmTopTech/sites/all/themes/engines/peroxide/phamlp