Search code examples
rubywarningspsych

Ruby 1.9.2-p290 through rbenv produces warning from psych-1.2.1: VERSION and LIBYAML_VERSION


When I running ruby I get the following warnings:

~/.gem/gems/psych-1.2.1/lib/psych.rb:93: warning: already initialized constant VERSION
~/.gem/gems/psych-1.2.1/lib/psych.rb:96: warning: already initialized constant LIBYAML_VERSION

I've tried googling around but can seem to find a solution which makes me think it's specific to my system. Is there a way to fix this?


Solution

  • This problem seems to originate in psych being called by bundler in Bundler.setup. The work-around I used:

    gem 'psych'
    

    In my code before

    Bundler.setup