I run my ruby app in development on my webserver and everything works fine. As soon as I deploy it to the production webserver, whichs runs with passenger I get the following error:
I, [2017-07-27T13:15:14.594740 #26105] INFO -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] Started GET "/" for 92.50.69.170 at 2017-07-27 13:15:14 +0200
I, [2017-07-27T13:15:14.597422 #26105] INFO -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] Processing by NewsController#index as HTML
I, [2017-07-27T13:15:14.605119 #26105] INFO -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] Rendering news/index.html.erb within layouts/application
I, [2017-07-27T13:15:14.606419 #26105] INFO -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] Rendered news/index.html.erb within layouts/application (1.0ms)
> I, [2017-07-27T13:15:14.650500 #26105] INFO -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] Completed 500 Internal Server Error in 53ms (ActiveRecord: 0.0ms)
F, [2017-07-27T13:15:14.652101 #26105] FATAL -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef]
F, [2017-07-27T13:15:14.652170 #26105] FATAL -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] ActionView::Template::Error (invalid byte sequence in UTF-8):
F, [2017-07-27T13:15:14.652565 #26105] FATAL -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 15:
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 16:
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 17:
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 18: <%= stylesheet_link_tag 'application', media: 'all', "data-turbolinks-track" => true %>
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 19:
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 20: <%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
[3cbea21c-5d64-41ba-ac9e-69887cc9ebef] 21:
F, [2017-07-27T13:15:14.652600 #26105] FATAL -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef]
F, [2017-07-27T13:15:14.652633 #26105] FATAL -- : [3cbea21c-5d64-41ba-ac9e-69887cc9ebef] app/views/layouts/application.html.erb:18:in `_app_views_layouts_application_html_erb__1631551722207135725_70167078217020'
All I've changed is this in the enviroment.rb
file:
Encoding.default_internal = 'utf-8'
Encoding.default_external = 'utf-8'
I use Ruby 2.3.1(p112) and Rails 5.0.
Could you please tell me whats wrong here?
Best regards