in rails warning: already initialized constant
Asked Answered
P

2

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

Petrapetracca answered 17/10, 2012 at 17:23 Comment(2)
What gems are you using?Aspergillus
gem 'rails', '3.2.7' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails'Petrapetracca
K
7

Perhaps the solution described on this gist will help:

rvm use 1.9.3
gem uninstall psych
gem install psych
Kissinger answered 17/10, 2012 at 17:28 Comment(0)
T
11

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

Transmit answered 30/3, 2013 at 16:29 Comment(2)
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 psychPetrapetracca
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.Dumbfound
K
7

Perhaps the solution described on this gist will help:

rvm use 1.9.3
gem uninstall psych
gem install psych
Kissinger answered 17/10, 2012 at 17:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.