Recent Rails 3: ActionView :: Template :: Error (failed to parse YAML on row 105, column 13)

I recently ran into some kind of weird issue or Rails 3, possibly since updating the new rubygems 1.5. Basically, when I deploy my program in nginx with passenger 3.0.2, I immediately have 500 pages, and such problems arise in my log:


ActionView::Template::Error (couldn't parse YAML at line 105 column 13):
    10: </div>
    11: <% end %>
    12: <div class="field">
    13:     <%= f.label :name %> <%= f.text_field :name %>
    14: </div>
    15: <div class="field">
    16:     <%= f.label :password %> <%= f.password_field :password %>
  app/views/sessions/new.html.erb:13:in `block in _app_views_sessions_new_html_erb___4159562374589718885_19217640_4456777064017176818'
  app/views/sessions/new.html.erb:5:in `_app_views_sessions_new_html_erb___4159562374589718885_19217640_4456777064017176818'

It seems that the environment does not have something, and therefore it cannot recognize all form_for elements. Basically, the page is just a simple login page with two fields - name and password. This problem also occurs for other forms pages, but only in a production environment. In a development environment, it works completely fine. I updated all my gems to the latest version, including rails 3.0.4, which, however, does not seem to be completely related to this problem. I also used to deploy the same on ubuntu on my VMware BEFORE gem 1.5, now everything is fine, but there are no new deployment options.

2 ubuntu, . Nginx . , . - ? , !

PS: , , : http://railstutorial.org/chapters/sign-in-sign-out#top

+3
3

config/boot.rb, .

require 'yaml'
YAML::ENGINE.yamler= 'syck'
+10

. :

require 'yaml'

YAML:: Engine.

+1

For problems with yaml syntax, such as "View / Show Invisible" in TextMate, it can be very useful to find syntax problems, yaml is very sensitive to this. In my case, I just had to replace all the tabs with spaces in all the locale files. Also note if you do not have nodes with the same name on the same level.

0
source

Source: https://habr.com/ru/post/1790909/


All Articles