LoginSignup
7
6

More than 5 years have passed since last update.

Rubyを全く触ったことない人がMilkodeを導入するまで

Last updated at Posted at 2015-03-26

Rubyのインストール

Rubyのサイト(http://rubyinstaller.org/downloads/)
からrubyinstaller-2.0.0-p643-x64をダウンロード(Windows 7 64bitの場合)。

milkodeのインストール

DevKitの初期化、インストール

ruby 2.0.0p643 (2015-02-25) [x64-mingw32]
C:\Users\hogehoge>gem install milkode

と入力する。なにやら失敗した。

ERROR:  Error installing milkode:
The 'eventmachine' 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'

なにやらDevKitなるものを入れないといけないようだ。
さきほどのRubyのサイト(上記)から
DevKit-mingw64-64-4.7.2-20130224-1432-sfx
をダウンロードする。
DevKitを”C:\DevKit”とかのフォルダを指定して展開。

初期化後、インストール。

C:\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v2.0.0 at C:/Ruby200-x64

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:\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:/Ruby200-x64

C:\DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'
[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'

jsonとrroongaのインストール

milkode公式サイトを見ると
jsonとrroongaなるものを入れないといけないらしいので、

C:\DevKit>gem install json
C:\DevKit>gem install rroonga

いけたみたいなので再度milkodeをインストール

C:\DevKit>gem install milkode

を実行。通った。

どうやら、milkodeの公式サイトの
RubyInstaller + DevKit
てやつにあたるようだ。

milkの初期化をする。

C:\DevKit>milk init

プロジェクトの追加

プロジェクトの追加をする。

C:\DevKit>milk add Project

お疲れ様でした。成功です。
あとは

C:\DevKit>milk web

なんかすれば
図1.png
終わりです。

.SVNとかバイナリファイルやテキストファイルを検索から除外したい場合は

milk ignore *.exe
milk ignore .svn

とか記述すれば検索が早くなる(Gitの.gitignoreに対応しているらしい)

あと社内にWebサーバーを立ち上げ、そこにアクセスしたい場合なんかは、

milk web -o 0.0.0.0

と記述し、ファイアウォールを無効化なりすれば、アクセスできます。

なかなかハマッった。。。

7
6
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6