Problems with Merb on Snow Leopard
I've recently started looking at Merb, for use with some small projects around the office. I'm trying to set up my first project following the docs, and am encountering an exception such as:
foo:beta user$ merb
Merb root at: /Users/user/code/merb/beta
Loading init file from ./config/init.rb
Loading ./config/environments/development.rb
~ Connecting to database...
~ Loaded slice 'MerbAuthSlicePassword' ...
~ Parent pid: 39794
~ Compiling routes...
~ Activating slice 'MerbAuthSlicePassword' ...
~
~ FATAL: Mongrel is not installed, but you are trying to use it. You need to either install mongrel or a different Ruby web server, like thin.
I have installed Mongrel fro开发者_运维问答m gem as well as from MacPorts, and am confused by this exception.
Significant stats:
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]
From my installed gems:
merb (1.1.0)
merb-action-args (1.1.0)
merb-assets (1.1.0)
merb-auth (1.1.0)
merb-auth-core (1.1.0)
merb-auth-more (1.1.0)
merb-auth-slice-password (1.1.0)
merb-cache (1.1.0)
merb-core (1.1.0)
merb-exceptions (1.1.0)
merb-gen (1.1.0)
merb-haml (1.1.0)
merb-helpers (1.1.0)
merb-mailer (1.1.0)
merb-param-protection (1.1.0)
merb-slices (1.1.0)
merb_datamapper (1.1.0)
mongrel (1.1.5)
Merb documentation is non-existent, so I find myself stuck.
Thanks in advance.
Try to use Thin handler. Its much faster than mongrel.
gem install thin
merb -a thin
mongrel is quite outdated and doesn't always work with newer rubys. If thin
doesn't work either try using webrick (merb -a webrick
). That's the default server on ruby, and should work fine (albeit it's the slowest of all)
With Merb 1.1, I found that if you add this line to your app's Gemfile (in the app root) this error goes away:
gem "mongrel"
精彩评论