Note that there are some explanatory texts on larger screens.

plurals
  1. POrake db:migrate YAML parser error
    text
    copied!<p>I use ruby 1.9.2 and rake 0.9.2.2 on Ubuntu. </p> <p>When I want to</p> <pre><code>rake db:migrate </code></pre> <p>I get the following error message</p> <pre><code>rake aborted! couldn't parse YAML at line 89 column 16 /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:148:in `parse' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:148:in `parse_stream' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:119:in `parse' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:106:in `load' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/psych.rb:205:in `load_file' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:171:in `load_yml' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:157:in `load_file' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `block in load_translations' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:15:in `load_translations' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:57:in `init_translations' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/simple.rb:71:in `lookup' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n/backend/base.rb:26:in `translate' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:156:in `block in translate' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:152:in `catch' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/i18n-0.6.0/lib/i18n.rb:152:in `translate' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activerecord-3.1.3/lib/active_record/railtie.rb:102:in `block in &lt;class:Railtie&gt;' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in `call' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application/finisher.rb:56:in `block in &lt;module:Finisher&gt;' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing' /home/ralv/devapp/config/environment.rb:5:in `&lt;top (required)&gt;' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/application.rb:193:in `block (2 levels) in initialize_tasks' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' /usr/local/rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/bin/rake:33:in `&lt;top (required)&gt;' /usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `load' /usr/local/rvm/gems/ruby-1.9.2-p318/bin/rake:19:in `&lt;main&gt;' Tasks: TOP =&gt; db:migrate =&gt; environment </code></pre> <p>I can solve the problem by commenting out the 89th line of my locale file:</p> <pre><code>open_tasks: %{total} (%{count} offen) </code></pre> <p>But it's quite annoying to do this everytime I want to migrate the database...</p> <p>The problem seems to be the blank character in front of the first percent sign. If I change the line to</p> <pre><code>open_tasks: (%{total} (%{count} offen) </code></pre> <p>I can migrate without an abortion.</p> <p>How can I avoid this parser error?</p> <p>Thanks Christian</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload