C:\Users\main>gem install thin
Fetching: rack-1.4.1.gem (100%)
Fetching: eventmachine-1.0.0-x86-mingw32.gem (100%)
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
ERROR: Error installing thin:
The 'thin' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
C:\ruby\devkit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.7 at C:/ruby
Initialization complete! Please review and modify the auto-generated
'config.yml'file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\ruby\devkit>ruby dk.rb review
Based upon the settings in the 'config.yml'file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/ruby
C:\ruby\devkit>ruby dk.rb install
[INFO] Updating convenience notice gem override for'C:/ruby'[INFO] Installing 'C:/ruby/lib/ruby/site_ruby/devkit.rb'
再びthinインストール
C:\ruby\devkit>gem install thin
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed thin-1.5.0
1 gem installed
Installing ri documentation for thin-1.5.0...
Installing RDoc documentation for thin-1.5.0...
今度は上手く行ったようです。
ruファイル作成
とりあえず「C:\thin\fart.ru」を作成しました。
app = proc do|env|[200,# Status code
{# Response headers
'Content-Type'=>'text/html','Content-Length'=>'2',},['hi']# Response body
]end# You can install Rack middlewares
# to do some crazy stuff like logging,
# filtering, auth or build your own.
use Rack::CommonLogger
run app
C:\apache2\htdocs>cd \thin
C:\thin>thin start -R fart.ru
>> Thin web server (v1.5.0 codename Knife)>> Maximum connections set to 1024>> Listening on 0.0.0.0:3000, CTRL+C to stop