<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>常駐 on 答えを知りたい</title><link>https://hack.ironsand.net/tags/%E5%B8%B8%E9%A7%90/</link><description>Recent content in 常駐 on 答えを知りたい</description><generator>Hugo -- 0.147.9</generator><language>en-US</language><lastBuildDate>Sat, 07 May 2011 11:46:31 +0000</lastBuildDate><atom:link href="https://hack.ironsand.net/tags/%E5%B8%B8%E9%A7%90/index.xml" rel="self" type="application/rss+xml"/><item><title>Rubyのスクリプトをサービスとして常駐させる</title><link>https://hack.ironsand.net/2011/how-to-run-ruby-script-as-a-deamon/</link><pubDate>Sat, 07 May 2011 11:46:31 +0000</pubDate><guid>https://hack.ironsand.net/2011/how-to-run-ruby-script-as-a-deamon/</guid><description>&lt;p>Python か Ruby のスクリプトを常駐させたかったので調べてみたら Ruby の方が簡単そうだったので試してみた。&lt;/p>
&lt;h3 id="環境">環境&lt;/h3>
&lt;p>OS:Windows 7&lt;/p>
&lt;p>ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]&lt;/p>
&lt;p>gem 1.3.4&lt;/p>
&lt;p>Portable バージョンを使ってます。&lt;/p>
&lt;h3 id="win32-service-のインストールcgem-install-win32-service">Win32-Service のインストール&lt;pre class=prettyprint>C:&amp;gt;gem install win32-service&lt;/pre>&lt;/h3>
&lt;p>するだけです。&lt;/p>
&lt;p>ただうちの環境ではこんなエラーが出てしまいました。&lt;pre class=prettyprint>P:/Dropbox/bin/RailsPortable/App/Rails/bin/ruby.exe extconf.rb checking for strncpy_s()&amp;hellip; yes creating Makefile nmake Microsoft(R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. P:\Dropbox\bin\RailsPortable\App\Rails\bin\ruby -e &amp;ldquo;puts &amp;lsquo;EXPORTS&amp;rsquo;, &amp;lsquo;Init_api&amp;rsquo;&amp;rdquo; &amp;gt; api-i386-mswin32.def cl -nologo -I. -I. -IP:/Dropbox/bin/RailsPortable/App/Rails/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -DHAVE_STRNCPY_S -c -Tcwin32/api.c cl : コマンド ライン warning D9035 : オプション &amp;lsquo;Og-&amp;rsquo; の使用は現在推奨されていません。今後のバージョンからは削除されます。 cl : コマンド ライン warning D9002 : 不明なオプション &amp;lsquo;-G6&amp;rsquo; を無視します api.c p:\dropbox\bin\railsportable\app\rails\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189: #error : MSC version unmatch NMAKE : fatal error U1077: &amp;lsquo;&amp;ldquo;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.EXE&amp;rdquo;&amp;rsquo; : Stop.&lt;/pre>&lt;/p></description></item></channel></rss>