can not install RubyGems (uninitialized constant

Discussion in 'Ruby' started by Greg Hauptmann, Feb 6, 2009.

  1. Hi,

    I think I've upset my ruby/gems on my Redhat Linux box (I did an
    apt-get install ruby-libs). So I've installed again Ruby from source
    (did get some warnings - see previous post), and then tried to install
    RubyGem however I get the following error. Any ideas? Anything else
    I can post to help?

    [root@home rubygems-1.3.1]# ruby ./setup.rb
    /usr/lib/ruby/1.8/yaml.rb:14: uninitialized constant
    YAML::Syck::DefaultLoader (NameError)
    from ./lib/rubygems/config_file.rb:7:in `require'
    from ./lib/rubygems/config_file.rb:7
    from ./lib/rubygems.rb:882:in `require'
    from ./lib/rubygems.rb:882
    from ./setup.rb:22:in `require'
    from ./setup.rb:22

    Some addition config info:
    [root@home ~]#
    [root@home ~]# ruby -v
    ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
    [root@home ~]# which ruby
    /usr/local/bin/ruby
    [root@home ~]# which gem
    /usr/bin/gem
    [root@home ~]# gem -v
    /usr/lib/ruby/1.8/yaml.rb:14: uninitialized constant
    YAML::Syck::DefaultLoader (NameError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:7
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:8
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `require'
    from /usr/bin/gem:9


    thanks
    Greg Hauptmann, Feb 6, 2009
    #1
    1. Advertising

  2. PS. I noted I have a few matches for 'ruby'. Not sure if this is
    significant re my problem

    # find / -name ruby
    /usr/local/bin/ruby
    /usr/local/lib/ruby
    /usr/bin/ruby
    /usr/lib/swig1.3/ruby
    /usr/lib/ruby
    /root/source/redmine-0.7/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/ruby

    # which ruby
    /usr/local/bin/ruby

    2009/2/7 Greg Hauptmann <>:
    > Hi,
    >
    > I think I've upset my ruby/gems on my Redhat Linux box (I did an
    > apt-get install ruby-libs). So I've installed again Ruby from source
    > (did get some warnings - see previous post), and then tried to install
    > RubyGem however I get the following error. Any ideas? Anything else
    > I can post to help?
    >
    > [root@home rubygems-1.3.1]# ruby ./setup.rb
    > /usr/lib/ruby/1.8/yaml.rb:14: uninitialized constant
    > YAML::Syck::DefaultLoader (NameError)
    > from ./lib/rubygems/config_file.rb:7:in `require'
    > from ./lib/rubygems/config_file.rb:7
    > from ./lib/rubygems.rb:882:in `require'
    > from ./lib/rubygems.rb:882
    > from ./setup.rb:22:in `require'
    > from ./setup.rb:22
    >
    > Some addition config info:
    > [root@home ~]#
    > [root@home ~]# ruby -v
    > ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
    > [root@home ~]# which ruby
    > /usr/local/bin/ruby
    > [root@home ~]# which gem
    > /usr/bin/gem
    > [root@home ~]# gem -v
    > /usr/lib/ruby/1.8/yaml.rb:14: uninitialized constant
    > YAML::Syck::DefaultLoader (NameError)
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `gem_original_require'
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `require'
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:7
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `gem_original_require'
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `require'
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:8
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `gem_original_require'
    > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    > `require'
    > from /usr/bin/gem:9
    >
    >
    > thanks
    >
    >




    --
    Greg
    http://blog.gregnet.org/
    Greg Hauptmann, Feb 6, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?=

    Uninitialized constant objects

    =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?=, Jun 1, 2005, in forum: C++
    Replies:
    5
    Views:
    419
    Karl Heinz Buchegger
    Jun 1, 2005
  2. Trevor
    Replies:
    5
    Views:
    555
    Bill Kelly
    Jan 29, 2005
  3. Charles Hoffman
    Replies:
    0
    Views:
    157
    Charles Hoffman
    Feb 7, 2008
  4. Tom Cloyd

    Rubygems - uninitialized constant

    Tom Cloyd, Jul 18, 2008, in forum: Ruby
    Replies:
    2
    Views:
    138
    Eric Hodel
    Jul 23, 2008
  5. Eric Roscher
    Replies:
    3
    Views:
    358
    Eric Roscher
    Nov 24, 2009
Loading...

Share This Page