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

in_tail: Fix error on setting page for binary file #71

Merged
merged 1 commit into from
Aug 6, 2014

Conversation

kou
Copy link
Contributor

@kou kou commented Aug 6, 2014

How to reproduce:

  • Create a binary file by the following command:

    "ruby -e 'puts "\u3042"' > /tmp/xxx"
    
  • Open /daemon/setting/in_tail

  • Select "/tmp/xxx"

  • Error page is rendered

  • log/production.log says:

    ActionView::Template::Error (undefined method `join' for nil:NilClass):
        12:     = f.text_field :path, class: "form-control", disabled: true
        13:   = render partial: "shared/vue/in_tail_format", locals: { file: f.object.path, formats: @setting.known_formats, initialSelected: f.object.format || @setting.guess_format }
        14:
        15:   %pre= file_tail(@setting.path).join("\n")
        16:
        17:   %p
        18:     = f.submit t('terms.next'), class: "btn btn-lg btn-primary pull-right"
      app/views/fluentd/settings/in_tail/after_file_choose.html.haml:15:in `block in _app_views_fluentd_settings_in_tail_after_file_choose_html_haml___1713159989942914940_40548520'
    

How to reproduce:

  * Create a binary file by the following command:

        "ruby -e 'puts "\u3042"' > /tmp/xxx"

  * Open /daemon/setting/in_tail
  * Select "/tmp/xxx"
  * Error page is rendered
  * log/production.log says:

        ActionView::Template::Error (undefined method `join' for nil:NilClass):
            12:     = f.text_field :path, class: "form-control", disabled: true
            13:   = render partial: "shared/vue/in_tail_format", locals: { file: f.object.path, formats: @setting.known_formats, initialSelected: f.object.format || @setting.guess_format }
            14:
            15:   %pre= file_tail(@setting.path).join("\n")
            16:
            17:   %p
            18:     = f.submit t('terms.next'), class: "btn btn-lg btn-primary pull-right"
          app/views/fluentd/settings/in_tail/after_file_choose.html.haml:15:in `block in _app_views_fluentd_settings_in_tail_after_file_choose_html_haml___1713159989942914940_40548520'
uu59 added a commit that referenced this pull request Aug 6, 2014
in_tail: Fix error on setting page for binary file
@uu59 uu59 merged commit 95a701f into fluent:master Aug 6, 2014
@uu59
Copy link
Member

uu59 commented Aug 6, 2014

I can see the same issue as given steps, and confirm as fixed in this patch.
Thank you for your contribution!

@kou kou deleted the in-tail-fix-error-for-binary-file branch August 6, 2014 10:42
@kou
Copy link
Contributor Author

kou commented Aug 6, 2014

Thanks for merging it!
It seems that this product is useful...!

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

Successfully merging this pull request may close these issues.

2 participants