{"id":227,"date":"2010-10-25T10:39:54","date_gmt":"2010-10-25T10:39:54","guid":{"rendered":"http:\/\/nicholshayes.co.uk\/blog\/?p=227"},"modified":"2010-10-25T10:40:03","modified_gmt":"2010-10-25T10:40:03","slug":"mongrel_service-on-windows-7-64bit","status":"publish","type":"post","link":"http:\/\/nicholshayes.co.uk\/blog\/?p=227","title":{"rendered":"mongrel_service on Windows 7 64bit"},"content":{"rendered":"<p>My current applications run on Linux in production, but I still develop on Windows PCs. My main works PC runs Windows 7 Pro 64bit. This isn&#8217;t too much of a problem. Just a couple of things don&#8217;t work (like wicked_pdf), but I can fire up a VirtualBox Linux image and test via that when I need to.<\/p>\n<p>However, I needed to provide a production version of one of my applications for a colleague writing some documentation. In the past running a mongrel instance as a service on my PC has been great for this, but having recently upgraded to Rails 3, I&#8217;ve managed to kill my mongrel_service gem. Unfortunately reinstalling was not as easy as I thought. To get it to work I had to do the following:<\/p>\n<p>Install win32-service separately and force it to install the binary version rather than build it from source. To do that:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">gem install win32-service --platform x86-mswin32<\/div><\/div>\n<p>Notice the double dash before platform. The <a href=\"http:\/\/jwwishart.wordpress.com\/2010\/06\/21\/mongrel-rails-on-windows-7\/\">blog where I first got this from<\/a> had only one dash which caused me a little head scratching.<\/p>\n<p>Then I had to install the &#8216;pre&#8217; version of mongrel_service:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">gem install mongrel_service --pre<\/div><\/div>\n<p>I found that step from <a href=\"http:\/\/www.mail-archive.com\/mongrel-users@rubyforge.org\/msg05908.html\">this blog<\/a>.<\/p>\n<p>BTW, I run a command prompt as the administrator when running gem commands (right click cmd icon and select &#8216;run as administrator&#8217;) <\/p>\n<p>Once that was done I could use the mongrel_service as usual:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">C:\\Windows\\system32&gt;mongrel_rails service::install -N OLM_demo \\ -c C:\\web\\public_site\\olm -p 8001 -e production<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>My current applications run on Linux in production, but I still develop on Windows PCs. My main works PC runs Windows 7 Pro 64bit. This isn&#8217;t too much of a problem. Just a couple of things don&#8217;t work (like wicked_pdf), &hellip; <a href=\"http:\/\/nicholshayes.co.uk\/blog\/?p=227\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/227"}],"collection":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":4,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":231,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/231"}],"wp:attachment":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}