前編はこちら
Jekyllをアップグレードしました(前編)
Rubyの環境整備はこちら
Windowsに複数のRuby環境をインストールする
環境
- Windows8 64bit
- Ruby Ver.2.0.0
- Jekyll Ver.1.4.2
Jekyllインストール
まずJekyllが既にインストールされていないか確認。
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
ないですね。じゃ、インストールします。
$ gem install jekyll
無事にインストール完了しました。
試しにgem list
してみます。
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
blankslate (2.1.2.4)
bundle (0.0.1)
bundler (1.7.2)
celluloid (0.16.0, 0.16.0.pre2)
chunky_png (1.3.1)
classifier-reborn (2.0.1)
coffee-script (2.3.0)
coffee-script-source (1.8.0)
colorator (0.1)
compass (0.12.5)
execjs (2.2.1)
fast-stemmer (1.0.2)
ffi (1.9.3 x64-mingw32)
fssm (0.2.10)
hitimes (1.2.2)
io-console (0.4.2)
jekyll (2.3.0)
jekyll-coffeescript (1.0.1, 1.0.0)
jekyll-gist (1.1.0)
jekyll-paginate (1.0.0)
jekyll-sass-converter (1.2.1, 1.2.0)
jekyll-watch (1.1.1, 1.1.0)
json (1.7.7)
kramdown (1.4.1)
liquid (2.6.1)
listen (2.7.9)
mercenary (0.3.4)
minitest (4.3.2)
parslet (1.5.0)
posix-spawn (0.3.9, 0.3.6)
psych (2.0.0)
pygments.rb (0.6.0, 0.5.0)
rake (0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.5, 0.9.3)
rdoc (4.0.0)
redcarpet (3.1.2)
rouge (1.6.2)
safe_yaml (1.0.3)
sass (3.4.3, 3.2.19)
test-unit (2.0.0.0)
timers (4.0.0, 3.0.1)
toml (0.1.1)
wdm (0.1.0)
yajl-ruby (1.1.0)
たくさん入ったなぁ・・。
Jekyllを起動してみる
インストールが完了したので早速サーバー立ち上げてみます。
$ jekyll serve --watch
すると以下のようなメッセージが。
Please add the following to your Gemfile to avoid polling for changes:
require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
gem 'wdm', '>= 0.1.0'
end
と言っています。言われた通りGemファイルに以下の記述しておきます(前回記述しておきましたが)。
require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
gem 'wdm', '>= 0.1.0'
end
一回止めて再起動。
$ jekyll serve --watch
Configuration file: C:/.../_config.yml
Source: C:/...
Destination: C:/.../_site
Generating...
done.
Auto-regeneration: enabled for 'C:/....'
Configuration file: C:/..../_config.yml
Server address: http://0.0.0.0:4000/
Server running... press ctrl-c to stop.
特にエラーもなく上手く動作しているようです。
結局Rubyのバージョンを上げたら、無事にJekyllのアップグレードもできた、という何とも言えない解決でした。