在运行rails服务器时收到错误`<top(required)=“”>&#39;:未初始化的常量I18n(NameError)

时间:2018-03-13 11:10:56

标签: ruby-on-rails rails-i18n

我提取了最新的代码,并进行了捆绑安装。之后,当我启动服务器时,我收到以下错误。

prashanth@prashanth-OptiPlex-390:~/proj/ysignup$ rails s
/home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/i18n.rb:13:in `<top (required)>': uninitialized constant I18n (NameError)
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflector/inflections.rb:3:in `require'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflector/inflections.rb:3:in `<top (required)>'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflections.rb:1:in `require'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflections.rb:1:in `<top (required)>'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflector/methods.rb:3:in `require'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/inflector/methods.rb:3:in `<top (required)>'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/dependencies/autoload.rb:1:in `require'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support/dependencies/autoload.rb:1:in `<top (required)>'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support.rb:25:in `require'
    from /home/prashanth/.gems/gems/activesupport-4.2.10/lib/active_support.rb:25:in `<top (required)>'
    from /home/prashanth/.gems/gems/actionpack-4.2.10/lib/action_dispatch.rb:24:in `require'
    from /home/prashanth/.gems/gems/actionpack-4.2.10/lib/action_dispatch.rb:24:in `<top (required)>'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/server.rb:3:in `require'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/server.rb:3:in `<top (required)>'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:123:in `require'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:73:in `server'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/prashanth/.gems/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'
prashanth@prashanth-OptiPlex-390:~/proj/ysignup$

这是Gemfile:

gem 'rails-i18n'

0 个答案:

没有答案