コンソールを起動しようとすると、
/home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/base.rb:158:in `load_file': can not load translations from /var/www/railsapp/config/locales/ru.yml, expected it to return a hash, but does not (I18n::InvalidLocaleData)
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `block in load_translations'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `each'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `load_translations'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:57:in `init_translations'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:71:in `lookup'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n/backend/base.rb:26:in `translate'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n.rb:156:in `block in translate'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n.rb:152:in `catch'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/i18n-0.6.1/lib/i18n.rb:152:in `translate'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.1.0/lib/active_record/railtie.rb:102:in `block in <class:Railtie>'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `block in run_initializers'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /var/www/railsapp/config/environment.rb:6:in `<top (required)>'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/application.rb:78:in `require'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/application.rb:78:in `require_environment!'
from /home/username/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.1.0/lib/rails/commands.rb:39:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
アプリは正常に動作しますが、コンソールのみが起動しません。この問題は、2 番目の Rails バージョンからのアップグレードに関連している可能性があります。しかし、1年間はうまく機能しています。
私のru.yml:
ru:
activerecord:
attributes:
user:
password: "Пароль"
login: "Имя пользователя"
password_confirmation: "Повтор пороля"
models:
user: "пользователь"
ファントムエラーでした。ru.yml からコメントを削除した後、すべて正常に機能しました。