Search code examples
ruby-on-railsrakesecret-key

Rake secret command not working


When I run rake secret in my terminal, instead of getting a new key, i get

NoMethodError: undefined method 'reject' for #<String: blah blah blah>
c:/Sites/appname/config/application.rb:10:in '<module:appname>'
c:/Sites/appname/config/application.rb:9:in '<top (required)>'
c:/Sites/appname/Rakefile:4:in '<top (required)>'

I've checked that those three lines are identical to the ones of a known good project.

I'm using ruby 2.0.0 rails 4.1.1 I'm in my current project folder.

When i run rake secret in my other projects, the command works, but not when I run it from this new project.


Solution

  • The issue was with the figaro gem. it broke all rails s commands, and rake commands. I haven't figured out how to fix it yet, but more to come soon.

    Edit:

    The error was typo in the application.yml file used by figaro.