Cannot get webrick to start on Mac OS 10.5.6


Hi. I’m am new to Ruby on Rails and I’m trying to get my environment
up and running. I know that Ruby and Rails are pre installed on Mac
OS 10.5 but I was having some problems. I went and updated everything
with gem update --system, gem update, etc. However:

[Macintosh:rails/work/demo] jslicari% ruby script/server
Rails requires RubyGems >= . Please install RubyGems and try again:

Doesn’t even tell me what version it needs. But:

[Macintosh:rails/work/demo] jslicari% gem env
RubyGems Environment:

  • RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-
  • INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  • RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
    • ruby
    • universal-darwin-9
    • /Library/Ruby/Gems/1.8
    • /Users/jslicari/.gem/ruby/1.8
    • /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000

So RubyGems seems to be here with the latest and greatest version.
Something seems to be very out of sync here but I can’t figure out

I also tried downloaded rubygems 1.3.1 and installing it again but
that crashes:

[Macintosh:~/desktop/rubygems-1.3.1] jslicari% ruby setup.rb
./lib/rubygems.rb:723:in set_paths': uninitialized constant Gem::Etc (NameError) from ./lib/rubygems.rb:719:ineach’
from ./lib/rubygems.rb:719:in set_paths' from ./lib/rubygems.rb:526:inpath’
from ./lib/rubygems/source_index.rb:66:in
installed_spec_directories' from ./lib/rubygems/source_index.rb:56:infrom_installed_gems’
from ./lib/rubygems.rb:736:in source_index' from ./lib/rubygems/gem_path_searcher.rb:86:ininit_gemspecs’
from ./lib/rubygems/gem_path_searcher.rb:21:in initialize' from ./lib/rubygems.rb:684:innew’
from ./lib/rubygems.rb:684:in searcher' from ./lib/rubygems.rb:683:insynchronize’
from ./lib/rubygems.rb:683:in searcher' from ./lib/rubygems/custom_require.rb:34:inrequire’
from /sw/lib/ruby/1.8/tmpdir.rb:12
from ./lib/rubygems/custom_require.rb:31:in gem_original_require' from ./lib/rubygems/custom_require.rb:31:inrequire’
from setup.rb:95

I’m out of ideas.



Have you tried:

sudo gems update --system

Also, to install RubyGems from the source you need to add sudo:

sudo ruby setup.rb


Yes. I used sudo doing the update.

I also tried doing sudo gem cleanup and had all sorts of errors. I
found somewhere that showed how to do explicit removals using

gem list -d

to find out what is installed where and

gem uninstall --install-dir

to uninstall. So now I think I have removed all of the old versions

But that still hasn’t solved the problem of being unable to start the
webrick server. I still get the error:

[Macintosh:rails/work/demo] jslicari% sudo ruby script/server
Rails requires RubyGems >= . Please install RubyGems and try again:


Here’s how to update gems and rails from a stock 10.5.6 client install


miniTorrent:~ geo$ gem -v
miniTorrent:~ geo$ rails -v
Rails 1.2.6
miniTorrent:~ geo$ sudo gem update --system

Updating RubyGems…
Bulk updating Gem source index for:
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.3.1
1 gem installed
Updating version of RubyGems to 1.3.1
Installing RubyGems 1.3.1


Removing old RubyGems RDoc and ri
Installing rubygems-1.3.1 ri into
Installing rubygems-1.3.1 rdoc into

= Announce: RubyGems Release 1.3.0


RubyGems installed the following executables:

If gem was installed by a previous RubyGems installation, you may need
to remove it by hand.

RubyGems system software updated
miniTorrent:~ geo$
miniTorrent:~ geo$
miniTorrent:~ geo$
miniTorrent:~ geo$
miniTorrent:~ geo$
miniTorrent:~ geo$ gem -v
miniTorrent:~ geo$ rails -v
Rails 1.2.6
miniTorrent:~ geo$ sudo gem update rails
Updating installed gems
Updating rails
Successfully installed rake-0.8.3
Successfully installed activesupport-2.2.2
Successfully installed activerecord-2.2.2
Successfully installed actionpack-2.2.2
Successfully installed actionmailer-2.2.2
Successfully installed activeresource-2.2.2
Successfully installed rails-2.2.2
Gems updated: rake, activesupport, activerecord, actionpack,
activeresource, rails
miniTorrent:~ geo$ rails -v
Rails 2.2.2
miniTorrent:~ geo$ cd ~/Documents/
miniTorrent:Documents geo$ rails testme


miniTorrent:Documents geo$ cd testme/
miniTorrent:testme geo$ script/server
=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.2.2 application starting on
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at
** Starting Rails with development environment…
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
** Rails signals registered. HUP => reload (without restart). It might
work well.
** Mongrel 1.1.4 available at
** Use CTRL-C to stop.


Thanks, but this doesn’t work. Something must be really messed up

[Macintosh:~] jslicari% gem -v
[Macintosh:~] jslicari% rails -v
Rails 2.2.2
[Macintosh:~] jslicari% sudo gem update --system
Updating RubyGems
Nothing to update
[Macintosh:~] jslicari% sudo gem update rails
Updating installed gems
Nothing to update
[Macintosh:~] jslicari% cd Projects
[Macintosh:~/Projects] jslicari% cd rails
[Macintosh:~/Projects/rails] jslicari% rails testme


[Macintosh:~/Projects/rails] jslicari% cd testme
[Macintosh:~/Projects/rails/testme] jslicari% script/server
Rails requires RubyGems >= . Please install RubyGems and try again:
[Macintosh:~/Projects/rails/testme] jslicari%

I’m thinking I should just uninstall everything and start over from
scratch as something is is obviously out of whack here. I’m not sure
how to uninstall completely though and really make sure everything is

So how would I remove it by hand and verify it is all gone?