laserlemon / figaro

Simple Rails app configuration
MIT License
3.76k stars 288 forks source link

figaro prevents rake tasks from working in ruby 2.3.2 and rails 5.0.2 #265

Open ghost opened 7 years ago

ghost commented 7 years ago

I have an app I created. After installing figaro at the end of my development I could no longer run any rake task. Has anyone seen this before? I would get different variations of the following response no matter if I tried rake db:migrate, rake routes, rake secret, etc:

rake aborted! Psych::SyntaxError: (): mapping values are not allowed in this context at line 5 column 12 /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:60:in parse' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:56:inblock in raw_configuration' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:56:in raw_configuration' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:64:inglobal_configuration' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:32:in configuration' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:42:ineach' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/application.rb:36:in load' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro.rb:23:inload' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/figaro-1.1.1/lib/figaro/rails/railtie.rb:5:in block in <class:Railtie>' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/activesupport-5.0.3/lib/active_support/lazy_load_hooks.rb:41:inexecute_hook' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/activesupport-5.0.3/lib/active_support/lazy_load_hooks.rb:50:in block in run_load_hooks' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/activesupport-5.0.3/lib/active_support/lazy_load_hooks.rb:49:ineach' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/activesupport-5.0.3/lib/active_support/lazy_load_hooks.rb:49:in run_load_hooks' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/railties-5.0.3/lib/rails/application.rb:90:ininherited' /Users/mark/Documents/projects/hosting/myapp/config/application.rb:10:in <module:Poster>' /Users/mark/Documents/projects/hosting/myapp/config/application.rb:9:in<top (required)>' /Users/mark/Documents/projects/hosting/myapp/Rakefile:4:in require_relative' /Users/mark/Documents/projects/hosting/myapp/Rakefile:4:in<top (required)>' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/gems/rake-12.0.0/exe/rake:27:in <top (required)>' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/bin/ruby_executable_hooks:15:ineval' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/bin/ruby_executable_hooks:15:in `

'

jk1dd commented 7 years ago

hi @mrusson i tried to replicate the error but wasn't able to, all my rake tasks seemed to run fine - i am on macOS Sierra 10.12.5.

screen shot 2017-07-29 at 4 21 05 pm

this SO post had someone who had a syntax error in their application.yml causing figaro errors, in case that is something you could try.

stovermc commented 7 years ago

Hello @mrusson I have also tried to replicate this error and was unable to. The rake tasks are working fine for me. I agree with @jk1dd and would dig into your application.yml for a syntax error. I am running macOS sierra 10.12.6 and the project I tested in was using ruby 2.3.0 and rails 5.0.2

screen shot 2017-08-01 at 9 04 18 pm