Ubuntu 8.10 に Merb をインストール
RubyGems のバージョンアップ
Merb をインストールするには RubyGems バージョン 1.3.0 以上が必要となります。Ubuntu 8.10 でインストールされる RubyGems はバージョンが 1.2.0 なので、まずは RubyGems をバージョンアップします。
$ sudo apt-get install rubygems $ sudo gem install rubygems-update $ sudo /var/lib/gems/1.8/bin/update_rubygems
早速 Merb をインストールしようとしましたが、mkmf が無いというエラー発生。
$ sudo gem install merb
Building native extensions. This could take a while...
ERROR: Error installing merb:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install merb
extconf.rb:21:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:21
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7/ext/gem_make.outこれは ruby-dev をインストールすると解決するらしい。
sudo apt-get install ruby-dev
気を取り直して再び Merb をインストールしようとすると、今度は sqlite3.h が無いといってエラーになってしまいました。
$ sudo gem install merb
Building native extensions. This could take a while...
ERROR: Error installing merb:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install merb
checking for sqlite3.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.8
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7/ext/gem_make.outsqlite3 の開発用ライブラリーをインストールする必要がありそうなので、libsqlite3-dev をインストールします。
$ sudo apt-get install libsqlite3-dev
今度は make が無いというエラーが。。。
$ sudo gem install merb
Building native extensions. This could take a while...
ERROR: Error installing merb:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install merb
checking for sqlite3.h... yes
checking for sqlite3_open() in -lsqlite3... yes
creating Makefile
make
sh: make: not found
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.7/ext/gem_make.outmake をインストール。
$ sudo apt-get install make
ふぅ、やっとインストール成功したようです。
$ sudo gem install merb Building native extensions. This could take a while... Successfully installed do_sqlite3-0.9.7 Successfully installed dm-timestamps-0.9.7 Successfully installed uuidtools-1.0.4 Successfully installed dm-types-0.9.7 Successfully installed dm-aggregates-0.9.7 Successfully installed dm-validations-0.9.7 Successfully installed randexp-0.1.4 Successfully installed dm-sweatshop-0.9.7 Successfully installed merb-1.0.1 9 gems installed Installing ri documentation for dm-timestamps-0.9.7... Installing ri documentation for uuidtools-1.0.4... Installing ri documentation for dm-types-0.9.7... Installing ri documentation for dm-aggregates-0.9.7... Installing ri documentation for dm-validations-0.9.7... Installing ri documentation for randexp-0.1.4... Installing ri documentation for dm-sweatshop-0.9.7... Installing RDoc documentation for dm-timestamps-0.9.7... Installing RDoc documentation for uuidtools-1.0.4... Installing RDoc documentation for dm-types-0.9.7... Installing RDoc documentation for dm-aggregates-0.9.7... Installing RDoc documentation for dm-validations-0.9.7... Installing RDoc documentation for randexp-0.1.4... Installing RDoc documentation for dm-sweatshop-0.9.7... Could not find main page README.txt Could not find main page README.txt Could not find main page README.txt Could not find main page README.txt
Merb - Ruby の WEB アプリケーションフレームワーク