Rails 3.2 support (+ assets) #12

Merged
merged 4 commits into from Feb 22, 2012

Projects

None yet

3 participants

@glebm
glebm commented Feb 2, 2012

No description provided.

@glebm
glebm commented Feb 2, 2012

Hmm, this works on dev, but didn't work on prod

@glebm
glebm commented Feb 2, 2012

Worked on prod after I've added asset host (config.action_mailer.asset_host)

Why is a mystery to me

@glebm
glebm commented Feb 5, 2012

All tests are green and some bugs were fixed

@ndbroadbent ndbroadbent merged commit 7d08b92 into premailer:master Feb 22, 2012
@guiocavalcanti

Hello, I'm getting NoMethodError: undefined methodfind_asset' for nil:NilClass` on Rails 3.2 with asset pipeline disabled. The error is coming from:

from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/bundler/gems/actionmailer_inline_css-7d08b92d2bb3/lib/overrides/premailer/premailer.rb:14:in `load_css_from_local_file!'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/premailer-1.7.3/lib/premailer/premailer.rb:249:in `load_css_from_html!'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/nokogiri-1.5.3/lib/nokogiri/xml/node_set.rb:239:in `each'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/nokogiri-1.5.3/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/nokogiri-1.5.3/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/premailer-1.7.3/lib/premailer/premailer.rb:233:in `load_css_from_html!'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/gems/premailer-1.7.3/lib/premailer/premailer.rb:190:in `initialize'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/bundler/gems/actionmailer_inline_css-7d08b92d2bb3/lib/action_mailer/inline_css_hook.rb:12:in `new'
    from /Users/guiocavalcanti/.rvm/gems/ruby-1.8.7-p352/bundler/gems/actionmailer_inline_css-7d08b92d2bb3/lib/action_mailer/inline_css_hook.rb:12:in `delivering_email'

Shouldn't it be checked before calling the find_asset method?

@guiocavalcanti

Nevermind, I found my config.action_mailer.asset_host was localhost:3000, I just added a http:// before and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment