0

私のアプリのすべてが正常に機能していて、数時間離れて、これに戻ってきました...

   Psych::SyntaxError in Home#index

Showing /Users/nelsonkeating/Desktop/ReminDeal/app/views/layouts/_navigation.html.erb where line #16 raised:

couldn't parse YAML at line 13 column 2
Extracted source (around line #16):

13: <div class="testform">
14:       <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
15:       
16:         <%= f.input :email, :required => false, :autofocus => true, :label => false, :placeholder => 'Email' %>
17:         <%= f.input :password, :required => false, :label => false, :placeholder => 'Password' %>
18:     <%= f.button :submit, "Sign in", :class =>'btn btn-info' %>
19:      <%= link_to 'Sign up', new_user_registration_path, :class=>'btn btn-success' %>
Trace of template inclusion: app/views/layouts/application.html.erb

Rails.root: /Users/nelsonkeating/Desktop/ReminDeal

Application Trace | Framework Trace | Full Trace
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse'
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:205:in `load_file'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:171:in `load_yml'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:157:in `load_file'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `block in load_translations'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `each'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `load_translations'
/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:57:in `init_translations'
/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:71:in `lookup'
/gems/i18n-0.6.0/lib/i18n/backend/base.rb:26:in `translate'
/gems/i18n-0.6.0/lib/i18n.rb:156:in `block in translate'
/gems/i18n-0.6.0/lib/i18n.rb:152:in `catch'
/gems/i18n-0.6.0/lib/i18n.rb:152:in `translate'
/gems/simple_form-2.0.2/lib/simple_form/inputs/base.rb:174:in `translate'
/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb:8:in `hint'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/single.rb:12:in `render'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:29:in `block in render'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:27:in `each'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:27:in `render'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:29:in `block in render'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:27:in `each'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/many.rb:27:in `render'
/gems/simple_form-2.0.2/lib/simple_form/wrappers/root.rb:15:in `render'
/gems/simple_form-2.0.2/lib/simple_form/form_builder.rb:115:in `input'
app/views/layouts/_navigation.html.erb:16:in `block in _app_views_layouts__navigation_html_erb__200588386938644858_70171278998500'
/gems/actionpack-3.2.3/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
/gems/actionpack-3.2.3/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
/gems/actionpack-3.2.3/lib/action_view/helpers/capture_helper.rb:40:in `capture'
/gems/actionpack-3.2.3/lib/action_view/helpers/form_helper.rb:606:in `fields_for'
/gems/client_side_validations-3.1.4/lib/client_side_validations/action_view/form_helper.rb:45:in `fields_for'
/gems/actionpack-3.2.3/lib/action_view/helpers/form_helper.rb:377:in `form_for'
/gems/client_side_validations-3.1.4/lib/client_side_validations/action_view/form_helper.rb:28:in `form_for'
/gems/simple_form-2.0.2/lib/simple_form/action_view_extensions/form_helper.rb:33:in `block in simple_form_for'
/gems/simple_form-2.0.2/lib/simple_form/action_view_extensions/form_helper.rb:51:in `with_simple_form_field_error_proc'
/gems/simple_form-2.0.2/lib/simple_form/action_view_extensions/form_helper.rb:32:in `simple_form_for'
app/views/layouts/_navigation.html.erb:14:in `_app_views_layouts__navigation_html_erb__200588386938644858_70171278998500'
/gems/actionpack-3.2.3/lib/action_view/template.rb:143:in `block in render'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:125:in `instrument'
/gems/actionpack-3.2.3/lib/action_view/template.rb:141:in `render'
/gems/actionpack-3.2.3/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
/gems/actionpack-3.2.3/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
/gems/actionpack-3.2.3/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `block in instrument'
/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `instrument'
/gems/actionpack-3.2.3/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/gems/actionpack-3.2.3/lib/action_view/renderer/partial_renderer.rb:237:in `render'
/gems/actionpack-3.2.3/lib/action_view/renderer/renderer.rb:41:in `render_partial'
/gems/actionpack-3.2.3/lib/action_view/helpers/rendering_helper.rb:27:in `render'
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___581424401402979334_70171303782600'
/gems/actionpack-3.2.3/lib/action_view/template.rb:143:in `block in render'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:125:in `instrument'
/gems/actionpack-3.2.3/lib/action_view/template.rb:141:in `render'
/gems/actionpack-3.2.3/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/gems/actionpack-3.2.3/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/gems/actionpack-3.2.3/lib/action_view/renderer/template_renderer.rb:18:in `render'
/gems/actionpack-3.2.3/lib/action_view/renderer/renderer.rb:36:in `render_template'
/gems/actionpack-3.2.3/lib/action_view/renderer/renderer.rb:17:in `render'
/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:110:in `_render_template'
/gems/actionpack-3.2.3/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/gems/actionpack-3.2.3/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/gems/actionpack-3.2.3/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:88:in `render'
/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:16:in `render'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/gems/activesupport-3.2.3/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/nelsonkeating/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
/gems/activesupport-3.2.3/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/gems/activerecord-3.2.3/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:39:in `render'
/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167:in `process_action'
/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:425:in `_run__3144154735564117921__process_action__4375222825164767808__callbacks'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/gems/actionpack-3.2.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `block in instrument'
/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `instrument'
/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
/gems/activerecord-3.2.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:121:in `process'
/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45:in `process'
/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203:in `dispatch'
/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246:in `block in action'
/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36:in `call'
/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call'
/gems/client_side_validations-3.1.4/lib/client_side_validations/middleware.rb:18:in `call'
/gems/warden-1.1.1/lib/warden/manager.rb:35:in `block in call'
/gems/warden-1.1.1/lib/warden/manager.rb:34:in `catch'
/gems/warden-1.1.1/lib/warden/manager.rb:34:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242:in `call'
/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338:in `call'
/gems/activerecord-3.2.3/lib/active_record/query_cache.rb:64:in `call'
/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `_run__2947535173615619242__call__2415189830075756674__callbacks'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/gems/railties-3.2.3/lib/rails/rack/logger.rb:26:in `call_app'
/gems/railties-3.2.3/lib/rails/rack/logger.rb:16:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/gems/actionpack-3.2.3/lib/action_dispatch/middleware/static.rb:62:in `call'
/gems/railties-3.2.3/lib/rails/engine.rb:479:in `call'
/gems/railties-3.2.3/lib/rails/application.rb:220:in `call'
/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/gems/railties-3.2.3/lib/rails/rack/log_tailer.rb:14:in `call'
/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/gems/rack-1.4.1/lib/rack/handler/thin.rb:13:in `run'
/gems/rack-1.4.1/lib/rack/server.rb:265:in `start'
/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
/gems/railties-3.2.3/lib/rails/commands.rb:55:in `block in '
/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
/gems/railties-3.2.3/lib/rails/commands.rb:50:in `'
script/rails:6:in `require'
script/rails:6:in `'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None

ここに_navigationファイル全体があります。

<ul class="nav">
    <span class="brand span" href="#">              
  <%= link_to logo, root_path %>
         </span>
<div class="span6 pull-right" id="nav-cont">
    <% if user_signed_in? %>
    <li>
        <div class="logout1">
    <%= link_to 'Logout', destroy_user_session_path, :method=>'delete', :class=>'btn btn-inverse' %> 
</div>       
    </li>
  <% else %>
<div class="testform">
      <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>

        <%= f.input :email, :required => false, :autofocus => true, :label => false, :placeholder => 'Email' %>
        <%= f.input :password, :required => false, :label => false, :placeholder => 'Password' %>
    <%= f.button :submit, "Sign in", :class =>'btn btn-info' %>
     <%= link_to 'Sign up', new_user_registration_path, :class=>'btn btn-success' %>
    </div>
    <% end %>
    <% end %>

</div>  

en.yml

# Sample localization file for English. Add more files in this directory for  locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.

en:
  hello: "Hello world"

database.yml

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

devise.en.yml

# Additional translations at https://github.com/plataformatec/devise/wiki/I18n

en:
  errors:
    messages:
      expired: "has expired, please request a new one"
      not_found: "not found"
      already_confirmed: "was already confirmed, please try signing in"
      not_locked: "was not locked"
      not_saved:
        one: "1 error prohibited this %{resource} from being saved:"
        :"%{count} errors prohibited this %{resource} from being saved:"
  devise:
    failure:
      already_authenticated: 'You are already signed in.'
      unauthenticated: 'You need to sign in or sign up before continuing.'
      unconfirmed: 'You have to confirm your account before continuing.'
      locked: 'Your account is locked.'
      invalid: 'Invalid email or password.'
      invalid_token: 'Invalid authentication token.'
      timeout: 'Your session expired, please sign in again to continue.'
      inactive: 'Your account was not activated yet.'
    sessions:
      signed_in: 'Signed in successfully.'
      signed_out: 'Signed out successfully.'
    passwords:
      send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
      updated: 'Your password was changed successfully. You are now signed in.'
      updated_not_active: 'Your password was changed successfully.'
      send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
    confirmations:
      send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
      send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
      confirmed: 'Your account was successfully confirmed. You are now signed in.'
    registrations:
      signed_up: 'Welcome! You have signed up successfully.'
      signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
      signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
      signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
      updated: 'You updated your account successfully.'
      update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
      destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
    unlocks:
      send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
      unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
      send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
    omniauth_callbacks:
      success: 'Successfully authenticated from %{kind} account.'
      failure: 'Could not authenticate you from %{kind} because "%{reason}".'
    mailer:
      confirmation_instructions:
        subject: 'Confirmation instructions'
      reset_password_instructions:
        subject: 'Reset password instructions'
      unlock_instructions:
        subject: 'Unlock Instructions'

新しいエラー

ArgumentError in Home#index

Showing /Users/nelsonkeating/Desktop/ReminDeal/app/views/layouts/_navigation.html.erb where line #16 raised:

syntax error on line 12, col -1: `  devise:
    failure:
      already_authenticated: 'You are already signed in.'
      unauthenticated: 'You need to sign in or sign up before continuing.'
      unconfirmed: 'You have to confirm your account before continuing.'
      locked: 'Your account is locked.'
      invalid: 'Invalid email or password.'
      invalid_token: 'Invalid authentication token.'
      timeout: 'Your session expired, please sign in again to continue.'
      inactive: 'Your account was not activated yet.'
    sessions:
      signed_in: 'Signed in successfully.'
      signed_out: 'Signed out successfully.'
    passwords:
      send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
      updated: 'Your password was changed successfully. You are now signed in.'
      updated_not_active: 'Your password was changed successfully.'
      send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
    confirmations:
      send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
      send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
      confirmed: 'Your account was successfully confirmed. You are now signed in.'
    registrations:
      signed_up: 'Welcome! You have signed up successfully.'
      signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
      signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
      signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
      updated: 'You updated your account successfully.'
      update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
      destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
    unlocks:
      send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
      unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
      send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
    omniauth_callbacks:
      success: 'Successfully authenticated from %{kind} account.'
      failure: 'Could not authenticate you from %{kind} because "%{reason}".'
    mailer:
      confirmation_instructions:
        subject: 'Confirmation instructions'
      reset_password_instructions:
        subject: 'Reset password instructions'
      unlock_instructions:
        subject: 'Unlock Instructions''
4

4 に答える 4

3

「YAMLを解析できませんでした」エラーは、YAMLファイルのフォーマットに問題があることを示しています。

あなたの場合、devise.en.ymlにフォーマットエラーがあります:

not_saved:
  one: "1 error prohibited this %{resource} from being saved:"
  :"%{count} errors prohibited this %{resource} from being saved:"

最後の行の:の前に、キーがありません。おそらくこれはどういうわけか誤って削除されましたか?他のデバイスの翻訳ファイルでは、通常、「その他」というキーが表示されます。

not_saved:
  one: "1 error prohibited this %{resource} from being saved:"
  other: "%{count} errors prohibited this %{resource} from being saved:"
于 2012-05-26T03:21:39.760 に答える
0

すべてのYMLファイルを以前のバージョンに置き換えました。このような問題が発生した場合は、おそらくこれらのファイルの1つに余分な文字やスペースが埋め込まれている可能性があります。ファイルが変更されていない場合は、ファイルを置き換えることをお勧めします。

于 2012-05-26T03:17:21.930 に答える
0

試す

en:
  - hello: "Hello world"
于 2012-05-26T02:45:59.543 に答える
0

このエラーが発生し、空白行にタブ文字が存在することが判明しました。見えませんが、明らかにパーサーがチョークしました。

vimでそれを見つけるために、私はタブ文字を検索しました:

/\t
于 2013-02-12T20:04:41.937 に答える