merbでFATAL: The gem dm-core (= 0.9.8, runtime), [] was not foundエラー

Tsukasa OISHI

merbをちゃんとやろうと、環境を整えてmerbアプリを作ってmerbコマンドで起動しようとしたら、

[tsukasa@ubuntu] $ merb
Loading init file from /home/tsukasa/test/config/init.rb
Loading /home/tsukasa/test/config/environments/development.rb
 ~
 ~ FATAL: The gem dm-core (= 0.9.8, runtime), [] was not found

のようなエラーが出た。dm-coreのバージョンが0.9.9だったので、config/dependencies.rbを以下のように修正する。

dm_gems_version   = "0.9.9"

でもやっぱりダメだ。詳しくみるために--verboseオプションをつけてみた。

[tsukasa@ubuntu] $ merb --verbose                                               [~/test]
 ~ Running bootloaders...
Loading init file from /home/tsukasa/test/config/init.rb
Loading /home/tsukasa/test/config/environments/development.rb
 ~ Loaded DEVELOPMENT Environment...
 ~ Expanding RUBY_PATH...
 ~ loading gem 'merb-action-args' ...
 ~ loading gem 'merb-assets' ...
 ~ loading gem 'merb-cache' ...
 ~ loading gem 'merb-helpers' ...
 ~ loading gem 'merb-mailer' ...
 ~ loading gem 'merb-slices' ...
 ~ loading gem 'merb-auth-core' ...
 ~ loading gem 'merb-auth-more' ...
 ~ Registered slice 'MerbAuthSlicePassword' located at /usr/lib/ruby/gems/1.8/gems/merb-auth-slice-password-1.0.7.1
 ~ loading gem 'merb-auth-slice-password' ...
 ~ loading gem 'merb-param-protection' ...
 ~ loading gem 'merb-exceptions' ...
 ~
 ~ FATAL: The gem dm-core (= 0.9.9, runtime), [] was not found
 ~
 ~ FRAMEWORK_ROOT = /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.7.1/lib
 ~
 ~ Gem::LoadError: Could not find RubyGem launchy (>= 0.3.2)

 ~ ./config/dependencies.rb:18
 ~ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
 ~ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
 ~ /home/tsukasa/test/config/init.rb:3
 ~ FRAMEWORK_ROOT/merb-core/bootloader.rb:520:in `load'
 ~ FRAMEWORK_ROOT/merb-core/bootloader.rb:520:in `load_initfile'
 ~ FRAMEWORK_ROOT/merb-core/bootloader.rb:388:in `run'
 ~ FRAMEWORK_ROOT/merb-core/bootloader.rb:99:in `run'
 ~ FRAMEWORK_ROOT/merb-core/server.rb:172:in `bootup'
 ~ FRAMEWORK_ROOT/merb-core/server.rb:42:in `start'
 ~ FRAMEWORK_ROOT/merb-core.rb:170:in `start'
 ~ /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.7.1/bin/merb:11
 ~ /usr/bin/merb:19:in `load'
 ~ /usr/bin/merb:19

お? launchy といえものがないらしい。なので入れてみた。

sudo gem install launchy

そしてmerb起動。

Loading init file from /home/tsukasa/test/config/init.rb
Loading /home/tsukasa/test/config/environments/development.rb
 ~ Connecting to database...
 ~ Loaded slice 'MerbAuthSlicePassword' ...
 ~ Parent pid: 6331
 ~ Compiling routes...
 ~ Activating slice 'MerbAuthSlicePassword' ...
merb : worker (port 4000) ~ Starting Mongrel at port 4000
merb : worker (port 4000) ~ Successfully bound to port 4000
merb : worker (port 4000) ~ Started request handling: Fri Jan 16 08:29:35 -0500 2009

動いた! やった~。