Ruby on rails: starting Mongrel Server
I know mongrel is the default server for "script / server", but when I do this command, I get webrick. (I used to work with a janitor). Now when I say it needs to use mongrel ("script / server mongrel"), the server won't start in the terminal. I get the following:
$ script/server mongrel
^C/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/gems.rb:11:in `require': Interrupt
from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:17
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1
from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get'
from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get'
from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each'
from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get'
from /Users/devinross14/.gem/ruby/1.8/gems/rails-2.3.3/lib/commands/server.rb:45
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
I just upgraded to snow leopard, if that helps ...
source to share
I have the same problem - this is the update thing. I've read a couple of blogs and it seems like the only way to solve this is to install mongrel from source. The guy on this blog supposedly worked: http://void-design.net/2009/08/05/ruby-191-mysql-and-a-snow-leopard/
source to share
I found that reinstalling all the gems seemed to fix the problem for me. Follow this link for the convenience of the terminal command: http://geekystuff.net/2009/1/14/remove-all-ruby-gems
Replace all uninstall commands with install commands, though:
gem list | cut -d" " -f1 | xargs sudo gem install
Remember, this installs the last of all, so if you have a specific version you need to, you will probably need to adjust the files accordingly.
source to share
the first comment isn't too bad, but it worked for me with:
$ sudo gem uninstall mongrel $ sudo gem uninstall fastthread $ sudo gem install mongrel $ sudo gem install fastthread
all removed gems must be recovered.
It seems like OS X copied the gems on upgrade, both were listed twice ...