Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::EACCES: Permission denied #24

Open
fastsyrup opened this issue Feb 11, 2015 · 4 comments
Open

Errno::EACCES: Permission denied #24

fastsyrup opened this issue Feb 11, 2015 · 4 comments

Comments

@fastsyrup
Copy link

Hi,

Just installed premailer (windows 7, ruby 1.9.3p484, rails 4.1.3) and trying to send a css email from the console. I get following error:

irb(main):009:0> BottlyMailer.invitation_email(e, "someone@gmail.com", "Name").deliver
Errno::EACCES: Permission denied - C:/Users/mike/Dropbox/kalenderfee/webapp/public
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer_inline_css-1.5.3/lib/overrides/premailer/premailer.rb:13:in `read'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer_inline_css-1.5.3/lib/overrides/premailer/premailer.rb:13:in `load_css_from_local_file_with_rails_path!'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/premailer-1.8.3/lib/premailer/premailer.rb:306:in `block in load_css_from_html!'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:187:in `block in each'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:186:in `upto'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:186:in `each'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/premailer-1.8.3/lib/premailer/premailer.rb:285:in `load_css_from_html!'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/premailer-1.8.3/lib/premailer/premailer.rb:234:in `initialize'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer_inline_css-1.5.3/lib/action_mailer/inline_css_hook.rb:12:in `new'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer_inline_css-1.5.3/lib/action_mailer/inline_css_hook.rb:12:in `delivering_email'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/mail.rb:230:in `block in inform_interceptors'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/mail.rb:229:in `each'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/mail.rb:229:in `inform_interceptors'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:220:in `inform_interceptors'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:230:in `deliver'
        from (irb):9
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.3/lib/rails/commands/console.rb:90:in `start'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.3/lib/rails/commands/console.rb:9:in `start'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.3/lib/rails/commands/commands_tasks.rb:69:in `console'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.3/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.1.3/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'irb(main):010:0>

Here's the template for the mail (haml)

!!!
%html
  %head
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= content_for?(:title) ? yield(:title) : "Kalenderfee"
    %meta{:content => content_for?(:description) ? yield(:description) : "Kalenderfee", :name => "description"}/
    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
  %body
    .application
      .row
        .container
          %p
            Hallo #{@name},
          %p
            = @event.owner.full_name
            möchte dich gerne zu #{@event.name} am #{I18n.l(@event.date.to_date, format: :local_date_short)} einladen. Kannst du dich bitte hierfür unter diesem Link an- oder abmelden? #{@event.owner.first_name} wird dir sicherlich sehr verbunden sein.
          %p
            %li
              %a{:href => event_url(@event)}= event_url(@event)  
          %p
            Danke und lieben Gruss
          %p
            \- Deine Kalenderfee        %footer

Appreciate your help

  • Mike
@bstrech
Copy link

bstrech commented Feb 26, 2015

I found that I had to back down the version of dependency gem premailer to 1.7.9

@kevinmarx
Copy link

I was seeing

Errno::EISDIR: Is a directory @ io_fread - /var/app/current/public
from /opt/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/actionmailer_inline_css-1.5.3/lib/overrides/premailer/premailer.rb:13:in `read'

Which backing down premailer to 1.7.9 also solved.

@wellington1993
Copy link

@bstrech @kevinmarx @fastsyrup I had the same problem, solved after downgrade from 1.8.6. to 1.79

@akzhan
Copy link
Member

akzhan commented Mar 7, 2017

Should be fixed by 6879d32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants