1

I'm having trouble encrypting my database.yml for Travis CI. Based on their documentation, it appears you encrypt files with the travis encrypt-file command. I'm running on Ruby-2.2.2 and it's giving me some pretty cryptic error messages.

travis encrypt-file config/database.yml --add

And I get this error:

private method `load' called for Psych:Module
for a full error report, run travis report

Here's the backtrace when I run travis report:

$ travis report 

/Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/api_command.rb:150:in `default_endpoint': undefined method `[]' for nil:NilClass (NoMethodError)
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/api_command.rb:154:in `detected_endpoint'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/api_command.rb:70:in `detected_endpoint?'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/api_command.rb:158:in `endpoint_option'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/command.rb:213:in `rescue in execute'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli/command.rb:191:in `execute'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/lib/travis/cli.rb:64:in `run'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/travis-1.7.7/bin/travis:18:in `<top (required)>'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/bin/travis:23:in `load'
        from /Users/William.Jeffries/.rbenv/versions/2.2.2/bin/travis:23:in `<main>'
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
williamcodes
  • 6,317
  • 8
  • 32
  • 55
  • You might want to check [this github issue](https://github.com/bbatsov/rubocop/issues/1510). What version of `Psych` do you use? Reverting the `Psych` gem to `2.0.5` seems to be a solution. Or you might want to try the latest version - the current one is `2.0.13`. – spickermann Jun 28 '15 at 22:56

2 Answers2

0

The solution was to uninstall Psych version 2.0.13 and have only 2.0.5 on my machine. I had both 2.0.5 and 2.0.13 and it seems that they were conflicting with each other. I found the information on this forum post.

williamcodes
  • 6,317
  • 8
  • 32
  • 55
0
gem update --system

solved it for me on Ubuntu 14.04 + RVM + Ruby 2.1.1p76 as mentioned at: https://github.com/bbatsov/rubocop/issues/1510#issuecomment-102645627

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985