Tom Connolly
Tom Connolly

Reputation: 694

I'm getting an error using Figaro gem in Rails

The error messages references a line in the gem, but I'm suspecting my trouble lay in my .yml file, which is here (with phony ids)

S3_KEY:ANGELINAANGELINA 

S3_SECRET:becaUSEILIKEherthatiswhy

S3_BUCKET:nameofmybucket

/home/tom/.rvm/gems/ruby-2.1.0/gems/figaro-0.7.0/lib/figaro.rb:39:in flatten': undefined methodreject' for # (NoMethodError)

Upvotes: 6

Views: 2379

Answers (3)

Luie7
Luie7

Reputation: 89

S3_KEY: ANGELINAANGELINA

S3_SECRET: becaUSEILIKEherthatiswhy

S3_BUCKET: nameofmybucket

Terminal : figaro install, To create the yml file and use the above format

Upvotes: 1

Ben
Ben

Reputation: 3357

Figaro doesn't parse tab space either. That means that if you want any indentation, you will need to use single spaces. You can use an online parser to validate your code and play around. Here's one: http://www.yamllint.com/

Upvotes: 1

Patrick
Patrick

Reputation: 716

Well if you're just handing out green checks... I'll take one! :)

Parsing error, have a space after each :

Upvotes: 4

Related Questions