[Merb-devel] Merb on Win32 Platform

merb-devel at rubyforge.org merb-devel at rubyforge.org
Mon Dec 4 12:10:47 EST 2006

I'm trying to get Merb running on Windows XP SP2 and am experiencing
some difficulties. I load http://localhost:4000/posts/new in my
browser expecting to see the contents of new.herb rendered. However
the following error is reported:

Request: PATH_INFO: /posts/new
Params: {"action"=>"new", "id"=>nil, "controller"=>"posts"}
Routing to controller: Posts action: new
Parsing HTTP Input took: 0.016 seconds
undefined local variable or method `session' for #<Posts:0x2da56a4> -

After a bit of grepping I see that merb.yml has commented out
":session: true". So I uncomment that line and restart merb.

This leads to the following error on the console:

C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:139:in `fork': the
fork() function is unimplemented on this machine (NotImplementedError)
        from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:139:in `start'
        from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:114:in `run'
        from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:193
        from C:/Ruby/bin/merb:18:in `load'
        from C:/Ruby/bin/merb:18

I tried to resolve this by adding the following to the end of the
"require ..." lines in merb.rb:
  require 'daemons'
  require 'win32-pr'
  require 'win32-process'
  require 'win32-dir'
  require 'win32-file'
  require 'win32-file-stat'

This did not solve the problem. Anyone familiar with how to get merb
working on a win32 platform? Ruby newbie here, probably asking silly
questions; please be patient :)



More information about the Merb-devel mailing list