2009年1月20日火曜日

Installing Merb for Windows



Rails 3からMerbが統合される話はブログで書きました。
Merbも覚えておかないといけなくなるので、Merbをインストールし初期ページまでを表示してみます。

1. gemアップデート
gem 1.3以上でなければ正常に動作しない。
# gem -v
# gem update --system

2. Merbインストール
# gem install merb
Install required dependency merb-more? [Yn] y
Install required dependency merb-action-args? [Yn] y
Install required dependency merb-assets? [Yn] y
Install required dependency merb-slices? [Yn] y
Install required dependency merb-auth? [Yn] y
Install required dependency merb-auth-core? [Yn] y
Install required dependency merb-auth-more? [Yn] y
Install required dependency merb-auth-slice-password? [Yn] y
Install required dependency merb-cache? [Yn] y
Install required dependency merb-exceptions? [Yn] y
Install required dependency merb-gen? [Yn] y
Install required dependency templater? [Yn] y
Install required dependency highline? [Yn] y
Install required dependency merb-haml? [Yn] y
Install required dependency haml? [Yn] y
Install required dependency merb-helpers? [Yn] y
Install required dependency merb-mailer? [Yn] y
Install required dependency mailfactory? [Yn] y
Install required dependency merb-param-protection? [Yn] y
Install required dependency do_sqlite3? [Yn] y
Select which gem to install for your platform (i386-mswin32)
1. do_sqlite3 0.9.10.1 (ruby)
2. do_sqlite3 0.9.10 (ruby)
3. do_sqlite3 0.9.9 (x86-mswin32-60)
4. do_sqlite3 0.9.9 (ruby)
5. Skip this gem
6. Cancel installation
> 3
Install required dependency data_objects? [Yn] y
Install required dependency dm-timestamps? [Yn] y
Install required dependency dm-types? [Yn] y
Install required dependency dm-aggregates? [Yn] y
Install required dependency dm-validations? [Yn] y
Install required dependency dm-sweatshop? [Yn] y
Install required dependency randexp? [Yn] y
Successfully installed merb-1.0.8
Successfully installed dm-types-0.9.9
Successfully installed dm-aggregates-0.9.9
Successfully installed dm-validations-0.9.9
Successfully installed dm-sweatshop-0.9.9
Successfully installed randexp-0.1.4
Installing ri documentation for dm-types-0.9.9...
Installing ri documentation for dm-aggregates-0.9.9...
Installing ri documentation for dm-validations-0.9.9...
Installing ri documentation for dm-sweatshop-0.9.9...
Installing ri documentation for randexp-0.1.4...
Installing RDoc documentation for dm-types-0.9.9...
Installing RDoc documentation for dm-aggregates-0.9.9...
Installing RDoc documentation for dm-validations-0.9.9...
Installing RDoc documentation for dm-sweatshop-0.9.9...
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
Installing RDoc documentation for randexp-0.1.4...

3. プロジェクト作成
# merb-gen app my_application
Generating with app generator:
[ADDED] Rakefile
[ADDED] app/controllers/application.rb
[ADDED] app/controllers/exceptions.rb
[ADDED] app/helpers/global_helpers.rb
[ADDED] app/models/user.rb
[ADDED] app/views/exceptions/not_acceptable.html.erb
[ADDED] app/views/exceptions/not_found.html.erb
[ADDED] autotest/discover.rb
[ADDED] autotest/merb.rb
[ADDED] autotest/merb_rspec.rb
[ADDED] config/database.yml
[ADDED] config/dependencies.rb
[ADDED] config/environments/development.rb
[ADDED] config/environments/production.rb
[ADDED] config/environments/rake.rb
[ADDED] config/environments/staging.rb
[ADDED] config/environments/test.rb
[ADDED] config/init.rb
[ADDED] config/rack.rb
[ADDED] config/router.rb
[ADDED] public/javascripts/application.js
[ADDED] public/stylesheets/master.css
[ADDED] merb/merb-auth/setup.rb
[ADDED] merb/merb-auth/strategies.rb
[ADDED] merb/session/session.rb
[ADDED] tasks/merb.thor
[ADDED] spec
[ADDED] .gitignore
[ADDED] public/.htaccess
[ADDED] tasks/doc.thor
[ADDED] public/javascripts/jquery.js
[ADDED] doc/rdoc/generators/merb_generator.rb
[ADDED] doc/rdoc/generators/template/merb/api_grease.js
[ADDED] doc/rdoc/generators/template/merb/index.html.erb
[ADDED] doc/rdoc/generators/template/merb/merb.css
[ADDED] doc/rdoc/generators/template/merb/merb.rb
[ADDED] doc/rdoc/generators/template/merb/merb_doc_styles.css
[ADDED] doc/rdoc/generators/template/merb/prototype.js
[ADDED] public/favicon.ico
[ADDED] public/images/merb.jpg
[ADDED] public/merb.fcgi
[ADDED] public/robots.txt
[ADDED] gems
[ADDED] app/views/layout/application.html.erb

4. 起動する
# cd my_application
# merb
FATAL: The gem do_sqlite3 (= 0.9.10.1, runtime), [] was not found

エラーが発生・・・
do_sqlite3のバージョンを確認してみる。
# gem list
...
do_sqlite3 (0.9.11, 0.9.9)
...
0.9.10.1がないですが・・・
インストールしてみる。
# gem install do_sqlite3 -v=0.9.10.1
ERROR: Error installing do_sqlite3:
ERROR: Failed to build gem native extension.

C:/ruby/bin/ruby.exe extconf.rb install do_sqlite3 -v=0.9.10.1
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
--srcdir=.
--curdir
--ruby=C:/ruby/bin/ruby
--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 C:/ruby/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.10.1 for inspection.
Results logged to C:/ruby/lib/ruby/gems/1.8/gems/do_sqlite3-0.9.10.1/ext/do_sqlite3_ext/gem_make.out

はまりました・・・

0 件のコメント: