Problems with RubyGems? Find here some handy tips

Some Rails update force you to upgrade RubyGems? Welcome to the pain (or not quite) of solving those small annoyances with RubyGems… at least on Windows ;-)

‘gem update –system’ is not really updating?

Sometimes RubyGems, like any software, get confused. Help him find it’s way. Becca Girl at ruby-talk found this problem (read it here).

I suggest that, if after a gem update you get some weird errors or the same old version when query for gem -v, don’t waste your time and proceed with the following:

  1. Download latest rubygems source package from here (zip format recommended).
  2. Extract the package contents somewhere (a new folder close to your root C:/ or D:/ will be a good option).
  3. Jump into the command line and disable RUBYOPT (set RUBYOPT=)
  4. cd into the folder you extracted RubyGems and run ruby setup.rb install
  5. Done!.

Now you should have the updated version of RubyGems (check with gem -v).

What about ‘rake.bat:24: undefined method’ errors or something like that?

If you updated from a release of RubyGems previous 0.9.4, you will see that some of your previous gems will show these problems, mostly due some deprecations and changes in the way batch files are generated.

An advice: sweep your gems! :-D

  1. Remove offending gem: gem uninstall rake
  2. confirm removal of rake executable
  3. Install gem again: gem install rake

Starting from RubyGems 1.1 and enhanced in 1.2, perform updates and install of new gems is faster, so thank all the RubyGems team for making you have more tiem to actual coding instead of performing updates!

And what about mongrel?

Jumping form 0.9.4 to 1.1 version of RubyGems broke binaries of mongrel in Windows (as commented in previous post here)

At this time you should have no problems, but if still find them, don’t hesitate to search mongrel-users mailing list (using Ruby-Forum) to find or post if new issues.

Two in distress makes sorrow less

Even I know there is no consolation in saying that Windows users are not the only one facing problems with RubyGems, I can only conclude that no matter which OS is your preference, each one will have it’s own glitches that will make you love or hate your platform.

Anyway, enough for today.

PS: Are you ready for Rails Summit Latin America?

2 Trackbacks

You can leave a trackback using this URL: http://blog.mmediasys.com/2008/08/04/problems-with-rubygems-find-here-some-handy-tips/trackback/

  1. [...] Problems with RubyGems? Find here some handy tips [...]

  2. By DEV_MEM.dump_to(:blog) - Multimedia systems blog on August 10, 2008 at 5:55 pm

    RubyGems: With power comes responsibility…

    Sounds like a movie, but should be applicable on every day work. I found that even you can trick RubyGems to do something, it doesn’t meant it is right. Please keep reading to understand my opinion.
    more>
    The power behind—platform
    Sin…

2 Comments

  1. Luiz

    I tryed to read a lot about’t but I still couldn’t fix this:
    => Booting Mongrel (use ’script/server webrick’ to force WEBrick)
    => Rails 2.1.0 application starting on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    Exiting
    C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_
    require’: no such file to load — win32/service (MissingSourceFile)
    from C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
    require’
    from C:/Ruby18/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_sup
    port/dependencies.rb:509:in `require’
    from C:/Ruby18/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_sup
    port/dependencies.rb:354:in `new_constants_in’
    from C:/Ruby18/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_sup
    port/dependencies.rb:509:in `require’
    from C:/Ruby18/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_se
    rvice/init.rb:5
    from C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
    gem_original_require’
    from C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
    require’
    from C:/Ruby18/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_sup
    port/dependencies.rb:509:in `require’
    … 17 levels…
    from C:/Ruby18/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb
    :39
    from C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
    gem_original_require’
    from C:/Ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
    require’
    from script/server:3

    please help
    Thank You

    Posted August 9, 2008 at 1:28 am | Permalink
  2. I really don’t know what version of Mongrel are you using, but I cannot replicate your problem with any of my mongrel installations.

    Looks your supplied @-d@ parameter, which is daemonize and is not supported on windows:

    
    => Booting Mongrel (use 'script/server webrick' to force WEBrick)
    => Rails 2.1.0 application starting on http://0.0.0.0:3000
    ** WARNING: Win32 does not support daemon mode.
    

    You should jump to mongrel-users mailing list and ask there with proper information about your environment.

    Posted August 9, 2008 at 4:03 am | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*