figaro icon indicating copy to clipboard operation
figaro copied to clipboard

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

Open ghost opened this issue 7 years ago • 2 comments

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:in block 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:in global_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:in each' /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:in load' /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:in execute_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:in each' /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:in inherited' /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:in eval' /Users/mark/.rvm/gems/ruby-2.3.2@myapp/bin/ruby_executable_hooks:15:in `

'

ghost avatar May 31 '17 05:05 ghost

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.

jk1dd avatar Jul 29 '17 22:07 jk1dd

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

stovermc avatar Aug 02 '17 03:08 stovermc