1
votes

after cloning a symfony2 repo, when I try to compile the assets with php app/console assetic:dump the following error occurs:

[Assetic\Exception\FilterException]
An error occurred while running:
'/Users/doe/.rbenv/shims/ruby' '/Users/doe/.rbenv/shims/sass' '--load-path' '/Applications/MAMP/htdocs/myapp/src/AppBundle/Resources/public/sass' '--scss' '--load-path' '/Applications/MAMP/htdocs/myapp/app/../web' '--cache-location' '/Applications/MAMP/htdocs/myapp/app/cache/dev' '/private/var/folders/8y/9vsj9q0d5c5155sj5vgk3
7p40000gn/T/assetic_sass5LiBb1'
Error Output:
ruby: no Ruby script found in input (LoadError)
Input: [sass file code here]

Could not figure out whats wrong, as path to executables are all OK. Any suggestions?

Thanks!

1
This is the article that helped me to solve this issue without downgrading: vvv.tobiassjosten.net/symfony/… - scones

1 Answers

1
votes

Found what was the problem.

By default, if you use rbenv with ruby 2.3.1 SASS gem is already installed, so which sass points you to a version of this gems that is not compatible.

The solution was:

  1. Install ruby version used to build the project, rbenv install 2.2.2

  2. Set this ruby version globally, ruby global 2.2.2

  3. Install the SASS gem for this version, gem install sass -v 3.4.18
  4. Get where the gems are installe, gem env home
  5. Get the executable path for SASS gem and copy it in parameters.yml

Now php app/console assetic:dump it's working.