私のプロジェクトでは、コンパス(グッズのみ、グリッドとコンポーネントなし)+ブートストラップを使用しています。
今、私は追加することに決めました:コンパス付きオートプレフィクサー
最初のステップはうまくいきます。
gem install --http-proxy http://:8080 autoprefixer-rails
Successfully installed autoprefixer-rails-2.1.1.20140710
1 gem installed
その後、これらの行を config.rb の最後に追加しました。「autoprefixer-rails」が必要
on_stylesheet_saved do |filename|
css = File.read(filename)
File.open(filename, 'w') do |io|
io << AutoprefixerRails.process(css)
end
end
コンパイル結果は次のとおりです。
>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>'
https://stackoverflow.com/a/14119187/1255274のように runtimes.rb を変更しようとしましたが、それでも失敗します。私はグーグルで助けを見つけることができません..誰かが何がうまくいかないのか考えていますか?
または、私がずっと間違った道を進んでいる場合、誰かが私に他のアプローチを勧めることができます...
ありがとう