0

Everything in my app was working fine, walked away for a few hours and came back to this...

   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

Heres the entire _navigation file..

<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'

NEW ERROR

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''
js111
  • 1,304
  • 4
  • 30
  • 57
  • line 12 in what?.. this is all the error shows – js111 May 26 '12 at 02:30
  • `couldn't parse YAML at line 12 column 9` means (to me) that something went wrong around line 12. Paste that in as well. – Makoto May 26 '12 at 02:33
  • Please paste in the full error stack. There is an error in one of your YAML files probably and we need to figure out which one. Are you using inherited resources? What's in your home#index definition? Lastly, if there is a YAML file in the full trace, make sure there's a blank space at the end of it. – Steph Rose May 26 '12 at 02:34
  • ok full trace posted, thanks.. and yes using inherited resources – js111 May 26 '12 at 02:36
  • Also just FYI, it looks like the around your form is inside the <% end %> tag for the form, and that doesn't seem right. – Steph Rose May 26 '12 at 02:36
  • Check in your locales/en.yaml file for any errors in syntax or spacing. – Steph Rose May 26 '12 at 02:37
  • If the controller is home#index, how is resource being assigned -- if on this page you raise `resource`, do you get nil or do you get an actual object? – Steph Rose May 26 '12 at 02:39
  • en.yml is posted above.. all thats in my home controller is class HomeController < ApplicationController def index @users = User.all end end – js111 May 26 '12 at 02:41
  • What page are you submitting this form for? Have you initialized `resource` somewhere? I just have a feeling there's something wrong with that, actually. That `resource` is not understood. Maybe it works on some pages but not on others. – Steph Rose May 26 '12 at 02:43
  • i just deleted the "simple_form_for(resource..." part and the homepage loaded fine.. then i try to go to the signup page and same exact error "couldn't parse YAML at line 13 column 2" – js111 May 26 '12 at 02:45
  • seems to be something with devise or simpleform.. so weird – js111 May 26 '12 at 02:46
  • Can you try to, in the simple form, actually set the params for the form without using inherited resources? And see if the signup page works then? – Steph Rose May 26 '12 at 02:49
  • that form is just the standard that devise provided me with when setting the app up.. have not modified it – js111 May 26 '12 at 02:51
  • in other words.. if i delete the entire _navigation file, the homepage which is just strict html loads fine.. but then i try to go to my /sigup page with a devise signup form... same YAML error. – js111 May 26 '12 at 02:52
  • And if you comment out the form on the signup page? – Steph Rose May 26 '12 at 02:53
  • it loads.. its devise or simpleform causing the issue – js111 May 26 '12 at 02:55
  • attached now is the devise.en.yml – js111 May 26 '12 at 02:58
  • See if this helps at all: http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml – Steph Rose May 26 '12 at 03:06
  • saw that.. now it changes to another error (pasted above) which is similar but prints out my devise.en.yml file – js111 May 26 '12 at 03:12
  • FIXED IT... Just replaced all my yml files with versions from an earlier commit.. they must have had an error in there, HATE YAML... thanks for the help! – js111 May 26 '12 at 03:16

4 Answers4

3

The "couldn't parse YAML" error suggests that there is an issue with the formatting of a YAML file.

In your case, there's a formatting error in your devise.en.yml:

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

Before the : on the last line, it is missing a key. Perhaps this was accidentally deleted somehow? In other devise translation files, I typically see the key "other".

not_saved:
  one: "1 error prohibited this %{resource} from being saved:"
  other: "%{count} errors prohibited this %{resource} from being saved:"
Kelly
  • 81
  • 3
0

Try

en:
  - hello: "Hello world"
DVG
  • 17,392
  • 7
  • 61
  • 88
0

Replaced all YML files with previous versions.. if you have a problem like this there is probably and extra character or space buried in one of those files.. can be impossible to find, recommend replacing files if they have not been modified.

js111
  • 1,304
  • 4
  • 30
  • 57
0

I had this error and it turned out to be a tab character that was present on a blank line. Invisible, but apparently caused the parser to choke.

To find it in vim I did a search for tab chars:

/\t
pixelearth
  • 13,674
  • 10
  • 62
  • 110