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 ...

+2


source to share


7 replies


It took a while, but I finally got mongrel (1.1.5) running on Snow Leopard. It's easy to do:

sudo gem uninstall mongrel
sudo gem uninstall fastthread
sudo gem install mongrel

      



It seems like fastthread needs to be recompiled as well.

+6


source


I managed to get it working without installing mongrel from source. All I had to do was reinstall the stone.

Alternatively, you can use a subtle, alternative alternative:



sudo gem install thin
thin start

      

This can make you walk in the meantime while the snow leopard settles.

+4


source


To start the mongrel server, the rails server mongrel . The command to start the mongrel server flashed on the internet does not work

+2


source


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/

0


source


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.

0


source


The easiest way to not have dramas with your dev server is to just use passenger with nginx or apache. Then you can also easily run multiple apps in dev mode without having to run on the command line to see what works.

0


source


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 ...

0


source







All Articles