Merbインストールメモ


Windows Vista Business
こちらを参考にさせていただきました。
KENJIRO LIFE: Installing Merb for Windows

Merbインストール

>gem install merb
**************************************************

Thank you for installing rspec-1.2.6

Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.

**************************************************
Successfully installed rspec-1.2.6
Successfully installed addressable-2.0.2
Successfully installed extlib-0.9.12
Successfully installed data_objects-0.9.11
Successfully installed dm-core-0.9.11
Successfully installed dm-migrations-0.9.11
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.4
Successfully installed json_pure-1.1.6
Successfully installed rack-1.0.0
Successfully installed mime-types-1.16
Successfully installed thor-0.9.9
Successfully installed merb-core-1.0.11
Successfully installed merb_datamapper-1.0.11
Successfully installed ZenTest-4.0.0
Successfully installed RubyInline-3.8.1
Successfully installed sexp_processor-3.0.1
Successfully installed ParseTree-3.0.3-x86-mswin32-60
Successfully installed ruby2ruby-1.2.2
Successfully installed merb-action-args-1.0.11
Successfully installed merb-assets-1.0.11
Successfully installed merb-slices-1.0.11
Successfully installed merb-auth-core-1.0.11
Successfully installed merb-auth-more-1.0.11
Successfully installed merb-auth-slice-password-1.0.11
Successfully installed merb-auth-1.0.11
Successfully installed merb-cache-1.0.11
Successfully installed merb-exceptions-1.0.11
Successfully installed highline-1.5.1
Successfully installed diff-lcs-1.1.2
Successfully installed templater-0.5.0
Successfully installed merb-gen-1.0.11
Successfully installed haml-2.0.9
Successfully installed merb-haml-1.0.11
Successfully installed merb-helpers-1.0.11
Successfully installed mailfactory-1.4.0
Successfully installed merb-mailer-1.0.11
Successfully installed merb-param-protection-1.0.11
Successfully installed merb-more-1.0.11
Successfully installed do_sqlite3-0.9.11-x86-mswin32-60
Successfully installed dm-timestamps-0.9.11
Successfully installed dm-types-0.9.11
Successfully installed dm-aggregates-0.9.11
Successfully installed dm-validations-0.9.11
Successfully installed randexp-0.1.4
Successfully installed dm-sweatshop-0.9.11
Successfully installed dm-serializer-0.9.11
Successfully installed merb-1.0.11
48 gems installed
・・・・・・

アプリ作成

>merb-gen app merb_test
Generating with app generator:
[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] 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] gems
[ADDED] app/views/layout/application.html.erb

サーバを起動してみる

>cd merb_test
>merb
Loading init file from c:/rbc/merb_test/config/init.rb
Loading c:/rbc/merb_test/config/environments/development.rb
~ Connecting to database...
~ Loaded slice 'MerbAuthSlicePassword' ...
~ Compiling routes...
~ Activating slice 'MerbAuthSlicePassword' ...
merb : worker (port 4000) ~ Starting Mongrel at port 4000
merb : worker (port 4000) ~ Successfully bound to port 4000

ブラウザで"http://localhost:4000"
こんな画面が出力されればオッケー


サーバの停止は Ctrl+C で。


とりあえずここまで。
そういえばGAE/Jで誰も"JRuby on Merb(JMerb?)"ってやってるの見たことないなぁ。