読者です 読者をやめる 読者になる 読者になる

./bin/rails g modelが通らない(Psych::SyntaxError編)

パーフェクト Ruby on Railsで勉強してたらわけわからんのハマった。

[keisei@kps-MacBook-Pro /Users/keisei/Codes/awesome_events]
¶(⁄•˅̮•∖)⁋ ❯ ./bin/rails generate model user provider:string uid:string nickname:string image_url:string
/Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/psych.rb:377:in `parse': (<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line 18 column 7 (Psych::SyntaxError)
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/psych.rb:377:in `parse_stream'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/psych.rb:325:in `parse'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/psych.rb:252:in `load'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/application.rb:313:in `secrets'
        from /Users/keisei/Codes/awesome_events/config/initializers/omniauth.rb:3:in `block in <top (required)>'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/omniauth-1.2.2/lib/omniauth/builder.rb:6:in `initialize'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:43:in `new'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:43:in `build'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:118:in `block in build'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:118:in `each'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:118:in `inject'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.1.1/lib/action_dispatch/middleware/stack.rb:118:in `build'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/engine.rb:498:in `app'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/application/finisher.rb:36:in `block in <module:Finisher>'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
        from /Users/keisei/Codes/awesome_events/config/environment.rb:5:in `<top (required)>'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:92:in `require'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:92:in `preload'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:143:in `serve'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:131:in `block in run'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in `loop'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application.rb:125:in `run'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/keisei/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'

解決策、というか、間違っていたところが、config/secrets.yml<<: *default_twitterと書くべきところを<<: * default_twitterと書いてしまっていた。スペース開けちゃダメよ。