Crysfel Villa Feb 6, 2014work,ruby,rails
Tengo aproximadamente 3 años usando compass y sass para generar mis temas de Ext JS, Sencha Touch o proyectos en Rails, nunca había tenido problemas, pero el día de hoy necesitaba instalar compass sobre ruby-1.9.3 y tuve algunos problemas. A continuación muestro la solución por si a alguien mas le sucede lo mismo.
Al instalar compass no tuve ningún problema, se descargo correctamente con todas sus dependencias.
$ gem install compass
La version que me instaló fue Compass 0.12.2. El problema apareció cuando quise generar un proyecto nuevo de la siguiente manera:
$ compass create test
/Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- sass/script/node (LoadError)
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/bin/compass:23:in `load'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/bin/compass:23:in `<main>'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
from /Users/crysfel/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
Resulta que este problema sucede porque compass me descarga la versión de sass (3.3.0.rc.2) y tienen un problema de compatibilidad. La solución es sencilla simplemente des-instalar sass 3.3 e instalar sass 3.2 de la siguiente manera.
$ gem uninstall sass
$ gem install sass -v 3.2.10
Eso fue suficiente para solucionar el problema.
Happy coding!
Te mando historias y consejos para mejorar tu carrera como Ingeniero de Software, también hablo sobre finanzas personales e inversiones.
©2023 ALL RIGHTS RESERVED CRYSFEL'S BLOG