使用Assetic PHP安装RVM后Sass损坏

我正在尝试设置Assetic PHP资产编译器,并且我已经使用CoffeeScript,Stylus和Less(所有NPM包都能很好地工作)。 但是,有了萨斯,我遇到了问题。 以下是我到目前为止采取的步骤:

  • 我安装了RVM和Ruby 1.9.3并运行了gem install sass
  • 我跑了哪个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 `' ' 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。 我的shell是ZSH。

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

你需要为它生成包装器,它将提供适当的环境,读取rvm wrapper输出以获取更多细节

Interesting Posts