これらの指示に従って premailer gem を機能させようとしています
フォルダーに gemfile を追加し、premailer を実行するための rake ファイルを追加して、プロジェクトをセットアップしました。
私のrakeファイルは次のようになります-
task :default do
require 'premailer'
premailer = Premailer.new('email_source.html', :warn_level => Premailer::Warnings::SAFE)
# Write the HTML output
fout = File.open("output.html", "w")
fout.puts premailer.to_inline_css
fout.close
# Write the plain-text output
fout = File.open("ouput.txt", "w")
fout.puts premailer.to_plain_text
fout.close
# Output any CSS warnings
premailer.warnings.each do |w|
puts "#{w[:message]} (#{w[:level]}) may not render properly in #{w[:clients]}"
end
end
次のエラーが表示されます -
undefined method `create_border_shorthand!' for #<CssParser::RuleSet:0x00000101533278>
githubでこのバグ クローズ レポートを見つけましたが、それが私の問題のルートであるかどうかはわかりません。
何がうまくいかないのですか?