前提・実現したいこと
Railsを勉強しており、あるプロジェクトをGitHubからダウンロードし、起動しようとしています。
該当のプロジェクト:https://github.com/akane4116/ortmit
その際に今エラーになっており、その対処をしていますが、なかなか起動できず困っています。
そこでみなさんの知恵をお貸し頂けたら幸いです。
"nil に対して `[]=' は未定義です"
とのことですが、いまいちなぜかがわかりません。
エラーログから以下の67行目を示されていたのでgmail[:mail_address]
のとこが気になりましたがよくわかりません。
発生している問題・エラーメッセージ
t:ortmit-master t$ rails s => Booting Puma => Rails 5.2.4.5 application starting in development => Run `rails server -h` for more startup options Exiting Traceback (most recent call last): 54: from bin/rails:4:in `<main>' 53: from bin/rails:4:in `require' 52: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands.rb:18:in `<top (required)>' 51: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/command.rb:46:in `invoke' 50: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/command/base.rb:69:in `perform' 49: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch' 48: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command' 47: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run' 46: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:142:in `perform' 45: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:142:in `tap' 44: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:147:in `block in perform' 43: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:51:in `start' 42: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout' 41: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app' 40: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/commands/server/server_command.rb:27:in `app' 39: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app' 38: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config' 37: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file' 36: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file' 35: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string' 34: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval' 33: from config.ru:3:in `block in <main>' 32: from config.ru:3:in `require_relative' 31: from /Users/t/Desktop/ortmit-master/config/environment.rb:5:in `<top (required)>' 30: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/application.rb:361:in `initialize!' 29: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:60:in `run_initializers' 28: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each' 27: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each' 26: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component' 25: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:347:in `call' 24: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:347:in `each' 23: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component' 22: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from' 21: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:415:in `call' 20: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:50:in `tsort_each_child' 19: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:50:in `each' 18: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from' 17: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from' 16: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from' 15: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 14: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each' 13: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:61:in `block in run_initializers' 12: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:32:in `run' 11: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:32:in `instance_exec' 10: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:607:in `block in <class:Engine>' 9: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:607:in `each' 8: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:608:in `block (2 levels) in <class:Engine>' 7: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:291:in `require' 6: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:257:in `load_dependency' 5: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:291:in `block in require' 4: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:291:in `require' 3: from /Users/t/Desktop/ortmit-master/config/environments/development.rb:1:in `<top (required)>' 2: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/railtie.rb:216:in `configure' 1: from /Users/t/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/railties-5.2.4.5/lib/rails/railtie.rb:216:in `instance_eval' /Users/t/Desktop/ortmit-master/config/environments/development.rb:67:in `block in <top (required)>': undefined method `[]' for nil:NilClass (NoMethodError)```
試したこと
はじめ、bundlerのエラーが出たため、Gemfile.lockを削除し、bundlerを再インストールしました。
rm Gemfile.lock gem install bundler -v 1.17.3 bundler _1.17.3_ install
その後、上記のエラーが出たため、
- 「undefined method '[]' for nil:NilClass (NoMethodError)」でググる
- undefined method `[]=' for nil:NilClass (NoMethodError) についてを参照
- エラーログからdeveropment.rbを確認
- エラーログからcredentials.yml.encを確認
回答1件
あなたの回答
tips
プレビュー