2017-01-20 15 views
0

Iは、レール・サーバの起動時に以下のエラーに直面しています:キャッチされない例外:未定義のメソッド `フォーマッター 'nilのために:NilClass

キャッチされない例外:未定義のメソッド`フォーマッター' nilのために:NilClass

をしかし、そのソリューションが私のために動作しませんでした

config.ruファイルにrequire './app'を追加することを提案、別のStackOverflowの質問、NoMethodError on Rails Serverがあり、(それがエラーになりました。)

Iもトン私は最近、この問題を解決するためにすべての宝石をアンインストールしたので、logger宝石を私のgemfileに追加しました。

Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile.

次のように正確なコンソール出力がある:

/home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:142:in `log_to_stdout' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 
 
\t /home/daniel/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>' 
 
\t /home/daniel/Data/RubyOnRails/YoutubeBlog/bin/rails:4:in `require' 
 
\t /home/daniel/Data/RubyOnRails/YoutubeBlog/bin/rails:4:in `<top (required)>' 
 
Exiting
Config.ru

# This file is used by Rack-based servers to start the application. 
 

 
require ::File.expand_path('../config/environment', __FILE__) 
 
run Rails.application

私はGemfileを削除しました。問題を解決しなかったbundle installbundle updateを実行しました。 (提案ありがとう)。

ご協力いただければ幸いです。 :|

+0

'config.ru'ファイルを投稿できますか? –

答えて

0

Gemfile.lockファイルを削除してから、bundle installを実行してみてください。

+0

私は依存関係の問題を解決しようとして既に100万回も行ってきました。 – danielbker

0

bundle updateを実行してください。問題が解決するはずです。

関連する問題