Search code examples
osx-lionwebrickruby-on-rails-2

Webrick loading very slowly on Mac OSX Lion


I have an old Rails 2.3.2 application that I just ported to my new Mac running OS X Lion.

When I launch the server (script/server) it prints out the following two lines

[2012-01-05 18:19:26] INFO  WEBrick 1.3.1
[2012-01-05 18:19:26] INFO  ruby 1.8.7 (2011-02-18) [i686-darwin9.8.0]

but then there is a very long delay before it prints out:

[2012-01-05 18:20:26] INFO  WEBrick::HTTPServer#start: pid=5792 port=3000

There must be something wrong.

How can I fix this problem?


Solution

  • It turns out that the compiler for Lion for Ruby has changed and Developer Tools 4.2 does not include it so I had to download the fix.

    From here:

    If you're running a fresh copy of Lion & Xcode 4.2, you're going to need to install the GCC 4.2 dev libraries first - they aren't included in a fresh Xcode 4.2 install.

    Once I recompiled my Ruby then everything worked properly.