-
-
Save igorw/961750 to your computer and use it in GitHub Desktop.
| Fatal error: Uncaught exception 'RuntimeException' with message '/Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Could not find RubyGem sass (>= 0) (Gem::LoadError) | |
| from /Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:219:in `activate' | |
| from /Users/igor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1065:in `gem' | |
| from /Users/igor/.rvm/gems/ruby-1.9.2-p0/bin/sass:18:in `<main>' | |
| ' in /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php:167 | |
| Stack trace: | |
| #0 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Filter/FilterCollection.php(57): Assetic\Filter\Sass\SassFilter->filterLoad(Object(Assetic\Asset\FileAsset)) | |
| #1 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Asset/BaseAsset.php(71): Assetic\Filter\FilterCollection->filterLoad(Object(Assetic\Asset\FileAsset)) | |
| #2 /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Asset/FileAsset.php(41): Assetic\Asset\BaseAsset->doLoad('body {??backgro...', in /Users/igor/Sites/silex-assetic/vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php on line 167 |
| <?php | |
| $app['assetic.filter_manager']->set('scss', | |
| new Assetic\Filter\Sass\ScssFilter($app['assetic.path'], '/Users/igor/.rvm/gems/ruby-1.9.2-p0/bin/sass')); | |
| // factory | |
| $css = $app['assetic']->createAsset(array( | |
| 'css/*.scss', | |
| ), array( | |
| 'scss', | |
| )); | |
| echo $css->dump(); |
@igorw I've got the same problem right now, on ubuntu with rvm. Dis you manage to solve this problem?
I did not, I'm afraid.
do you think that this is a ruby problem, an assetic problem, or a problem with the integration of assetic with ruby?
I use it with compass anyway...but the error is identical.
If i install rubygems via software center it works...but rvm is faster, and allow me to have different ruby+gems configuration.
In my case the cause for it was RVM doing some path magic that was ignored by the exec stuff used by assetic.
YAY!
Just found a solution!
You just need to create a wrapper script to load the ruby environment. Mine is:
#!/bin/bash
source "/usr/share/ruby-rvm/environments/ruby-1.9.2-p290"
exec compass "$@"
I place it in /usr/bin/compass and make it executable.
source: http://www.phphosts.org/blog/2011/03/how-to-use-rvm-installs-of-ruby-in-shell-cgi-scripts/
You should wrap the asset returned by
createAsset()in an instance ofAssetCacheand use HTTP caching, btw. See here.