In my project I am using compass (only goodies, no grid and components) + bootstrap.
Now I decided to add: Autoprefixer with compass
The first step goes fine.
gem install --http-proxy http://:8080 autoprefixer-rails
Successfully installed autoprefixer-rails-2.1.1.20140710
1 gem installed
after that I added these lines to the very last of config.rb; require 'autoprefixer-rails'
on_stylesheet_saved do |filename|
css = File.read(filename)
File.open(filename, 'w') do |io|
io << AutoprefixerRails.process(css)
end
end
Here is compilation result:
>compass compile dev --trace
create dev/../public/assets/css/main.css
ExecJS::ProgramError on line ["64"] of C: TypeError: Object doesn't support this property or method
C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.2.1/lib/execjs/external_runtime.rb:29:in `exec'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.2.1/lib/execjs/external_runtime.rb:18:in `eval'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.2.1/lib/execjs/external_runtime.rb:36:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/autoprefixer-rails-2.1.1.20140710/lib/autoprefixer-rails/processor.rb:20:in `process'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/autoprefixer-rails-2.1.1.20140710/lib/autoprefixer-rails.rb:10:in `process'
/dev/config.rb:24:in `block (2 levels) in get_binding'
/dev/config.rb:23:in `open'
/dev/config.rb:23:in `block in get_binding'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.19/lib/sass/callbacks.rb:60:in `[]'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.19/lib/sass/callbacks.rb:60:in `block in run_stylesheet_saved'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.19/lib/sass/callbacks.rb:60:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.19/lib/sass/callbacks.rb:60:in `run_stylesheet_saved'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/configuration/inheritance.rb:164:in `run_stylesheet_saved'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/configuration/inheritance.rb:166:in `run_stylesheet_saved'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:144:in `compile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:118:in `compile_if_required'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:103:in `block (2 levels) in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:101:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:101:in `block in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:126:in `timed'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/compiler.rb:100:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/commands/update_project.rb:45:in `perform'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/commands/base.rb:18:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/commands/project_base.rb:19:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/bin/compass:30:in `block in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/bin/compass:44:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.7/bin/compass:44:in `<top (required)>'
C:/Ruby193/bin/compass:23:in `load'
C:/Ruby193/bin/compass:23:in `<main>'
I tried to modify runtimes.rb as in https://stackoverflow.com/a/14119187/1255274, but still it fails. I am not able to find any help on google .. Do anyone has an idea of what can be going wrong?
Or anyone can recommend me some other approach if I am on the wrong path all the way...
Thanks