首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >premailer -未定义的方法create_border_shorthand

premailer -未定义的方法create_border_shorthand
EN

Stack Overflow用户
提问于 2012-05-09 00:17:08
回答 1查看 174关注 0票数 0

我正在尝试通过关注these instructions来让premailer gem正常工作。

我已经通过添加一个gemfile到我的文件夹和一个rake文件来运行premailer来设置我的项目。

我的rake文件看起来像这样-

代码语言:javascript
复制
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 

我收到以下错误-

代码语言:javascript
复制
undefined method `create_border_shorthand!' for #<CssParser::RuleSet:0x00000101533278>

我找到了这个bug closed report on github,但我不确定这是否是我问题的解决途径。

知道哪里出问题了吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-05-18 20:54:32

您是否在使用Bundler (即你有Gemfile吗)?

如果是这样,尝试添加这个: gem 'css_parser','1.2.5‘

然后捆绑安装,然后重试。这将排除github问题报告中的问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10502409

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档