【问题标题】:Sass broken after install with RVM, using Assetic PHP使用 Assetic PHP 安装 RVM 后 Sass 损坏
【发布时间】:2012-02-11 09:45:02
【问题描述】:

我正在尝试设置 Assetic PHP 资产编译器,我已经让它与 CoffeeScript、Stylus 和 Less 一起工作(所有 NPM 包都运行良好)。但是,对于 Sass,我遇到了问题。以下是我目前采取的步骤:

  • 我安装了 RVM 和 Ruby 1.9.3 并运行了 gem install sass
  • 我跑了 which sass。这返回了 /home/jon/.rvm/gems/ruby-1.9.3-p0/bin/sass
  • 我将该位置复制到 Assetic 中的 SassFilter.php 中,它在构造函数中显示 $sassPath = ''。这和我做咖啡等的方法一样。

现在,当我从我的主编译器文件中解析 PHP 时,我收到以下消息:

PHP Fatal error:  Uncaught exception 'RuntimeException' with message '/home/jon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find sass (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /home/jon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /home/jon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem'
from /home/jon/.rvm/gems/ruby-1.9.3-p0/bin/sass:18:in `<main>'
' in /home/jon/www/compilers/Assetic/Filter/Sass/SassFilter.php:158
Stack trace:
#0 /home/jon/www/compilers/Assetic/Filter/FilterCollection.php(62): Assetic\Filter\Sass\SassFilter->filterLoad(Object(Assetic\Asset\FileAsset))
#1 /home/jon/www/compilers/Assetic/Asset/BaseAsset.php(83): Assetic\Filter\FilterCollection->filterLoad(Object(Assetic\Asset\FileAsset))
#2 /home/jon/www/compilers/Assetic/Asset/FileAsset.php(57): Asseti in /home/jon/www/compilers/Assetic/Filter/Sass/SassFilter.php on line 158

我使用的是 Ubuntu 11.10、PHP 5.3.6、RVM 1.10.2 和 Ruby 1.9.3。我的外壳是 ZSH。

【问题讨论】:

  • 我也遇到了同样的问题,你解决了吗?

标签: php ruby rvm sass assetic


【解决方案1】:

直接在适当的环境之外运行这个二进制文件的效果

您需要为其生成包装器以提供适当的环境,请阅读rvm wrapper 的输出了解更多详细信息

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-29
    • 2016-03-17
    • 1970-01-01
    • 1970-01-01
    • 2011-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多