6
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning:       already initialized constant ANY
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning: already initialized constant UTF8
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning: already initialized constant UTF16LE
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning: already initialized constant UTF16BE
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:12: warning: already initialized constant ANY
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:15: warning: already initialized constant UTF8
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:18: warning: already initialized constant UTF16LE
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:21: warning: already initialized constant UTF16BE

i got this error when i strated my rails server for the first time after creating a new rails project. could anyone help me out of this

Abhiram
  • 1,459
  • 14
  • 23

2 Answers2

11

The fix for me was simply to do gem uninstall psych.

Alex Sharp
  • 533
  • 5
  • 12
  • i want to use psych for other application so i cant uninstall it. This works fine.. rvm use 1.9.3 gem uninstall psych gem install psych – Abhiram May 17 '13 at 15:02
  • This was the solution in my case too. I think the Ruby SDK I was using in RubyMine had possibly ended up with one copy, while Rails was loading another copy. Or something. Either way, uninstalling psych from the command line cheered it up. – Emma Burrows Jun 15 '16 at 17:54
7

Perhaps the solution described on this gist will help:

rvm use 1.9.3
gem uninstall psych
gem install psych
Buck Doyle
  • 6,333
  • 1
  • 22
  • 35