スポンサーリンク

このドキュメントの内容は、以下の通りです。

はじめに


Mediawikiのモバイル用フロントエンド Wikimedia Mobile は、Rubyで作られています。

bundler をインストールしておいたのでおきました。
[2013-01-25-1] FreeBSD にrubygem-bundlerをインストールする

ソースコードの取得


Wikimedia Mobileのソースコードを取得します。

git clone https://github.com/hcatlin/wikimedia-mobile.git

事前準備


bundle で環境を整備します。

% cd wikimedia-mobile
% bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Installing rake (0.8.7)
Installing abstract (1.0.0)
Installing curb (0.7.8) with native extensions
Installing daemons (1.1.0)
Installing dalli (0.11.2)
Installing diff-lcs (1.1.2)
Installing erubis (2.6.6)
Using eventmachine (0.12.10)
Installing extlib (0.9.15)
Installing haml (3.0.21)
Installing json (1.4.6) with native extensions
Using bundler (1.1.5)
Installing mime-types (1.16)
Installing rack (1.2.1)
Installing merb-core (1.1.3)
Installing merb-assets (1.1.3)
Installing merb-haml (1.1.3)
Installing mocha (0.9.9)
Installing nokogiri (1.3.3) with native extensions
Installing rack-test (0.5.6)
Installing rspec-core (2.0.0)
Installing rspec-expectations (2.0.0)
Installing rspec-mocks (2.0.0)
Installing rspec (2.0.0)
Installing thin (1.2.7) with native extensions
Installing typhoeus (0.2.0) with native extensions
Installing webrat (0.7.2)
Updating .gem files in vendor/cache
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rspec-core:
**************************************************

  Thank you for installing rspec-core-2.0.0

  Please be sure to look at Upgrade.markdown to see what might have changed
  since the last release.

**************************************************

Post-install message from merb-core:

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

                     (::)   U P G R A D I N G    (::)

Thank you for installing merb-core 1.1.3

The planned route for upgrading from merb 1.1.x to 1.2 will involve
changes which may break existing merb apps.  Fear not, fixes for
apps broken by 1.2 should be trivial. Please be sure to read
http://wiki.github.com/merb/merb/release-120 for the details
regarding usage of the upcoming 1.2 release.

(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

動かしてみる


% bundle exec merb -a thin
Merb root at: /usr/home/X/
/usr/local/lib/ruby/gems/1.8/gems/curb-0.7.8/lib/curb_core.so: [BUG] Segmentatio
n fault
ruby 1.8.7 (2012-10-12 patchlevel 371) [i386-freebsd9]

そもそもWikimedia MobileのページにRubyの1.9が条件になってるので、ダメなのかも。

再挑戦


Ruby-1.9, Ruby-1.8とそれぞれの関連パッケージを一掃し、ruby-1.9と/usr/ports/sysutils/rubygem-bundlerを入れなおしました。

% bundle exec merb -a thin
Merb root at: /usr/home/X/
	/usr/local/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:2:in `require': no such file to load -- iconv (LoadError)
	from /usr/local/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:2
	from /usr/local/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json.rb:1:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json.rb:1
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:400:in `load_dependencies'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:375:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:97:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:172:in `bootup'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:42:in `start'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core.rb:165:in `start'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/bin/merb:20
	from /usr/local/bin/merb:23:in `load'
	from /usr/local/bin/merb:23


ruby-iconvを入れる


ruby-iconv を入れてみました。
[2013-01-27-1] FreeBSDにruby-iconvをインストールする

またトライ


% bundle exec merb -a thin
Merb root at: /usr/home/X
Loading init file from ./config/init.rb
	/usr/local/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or directory - /usr/home/X/wikimedia-mobile/log/production.log (Errno::ENOENT)
	from /usr/local/lib/ruby/1.8/logger.rb:524:in `open'
	from /usr/local/lib/ruby/1.8/logger.rb:524:in `create_logfile'
	from /usr/local/lib/ruby/1.8/logger.rb:519:in `open_logfile'
	from /usr/local/lib/ruby/1.8/logger.rb:486:in `initialize'
	from /usr/local/lib/ruby/1.8/logger.rb:262:in `new'
	from /usr/local/lib/ruby/1.8/logger.rb:262:in `initialize'
	from /usr/home/kaworu/tmp/M/wikimedia-mobile/wikimedia-mobile/config/init.rb:25:in `new'
	from /usr/home/X/wikimedia-mobile/config/init.rb:25
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in `load'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in `load_initfile'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:377:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:97:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:172:in `bootup'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:42:in `start'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core.rb:165:in `start'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-core-1.1.3/bin/merb:20
	from /usr/local/bin/merb:23:in `load'
	from /usr/local/bin/merb:23


ディレクトリがないとおっしゃってる。。。それぐらい自分で作ってよ。。。
とおもいますが、作ってあげます。

mkdir log

気を取り直してトライ


とりあえず、動いた、というところです。

% bundle exec merb -a thin
Merb root at: /usr/home/X/wikimedia-mobile
Loading init file from ./config/init.rb
Loading ./config/environments/development.rb
Loading nb failed
Loading zh-cn failed
 ~ Compiling routes...
 merb : worker (port 4000) ~ Starting Thin at port 4000
 merb : worker (port 4000) ~ Using Thin adapter on host 0.0.0.0 and port 4000.
 merb : worker (port 4000) ~ Successfully bound to port 4000
 merb : worker (port 4000) ~ Started request handling: Mon Jan 28 00:25:03 +0900 2013
 merb : worker (port 4000) ~ Routed to: {"variant"=>"wiki", "controller"=>"articles", "action"=>"home"}
 merb : worker (port 4000) ~ Params: {"variant"=>"wiki", "controller"=>"articles", "action"=>"home"}
 merb : worker (port 4000) ~ Failed to use selector: #mp-tfa
 merb : worker (port 4000) ~ Failed to use selector: #mp-tfp
 merb : worker (port 4000) ~ Failed to use selector: #mp-dyk
 merb : worker (port 4000) ~ Failed to use selector: #mp-otd
 merb : worker (port 4000) ~ Failed to use selector: #mp-itn
 merb : worker (port 4000) ~ {:before_filters_time=>0.000214, :action_time=>1.200394, :after_filters_time=>0.054207, :dispatch_time=>1.201603}
 merb : worker (port 4000) ~

スポンサーリンク
スポンサーリンク
 
いつもシェア、ありがとうございます!


もっと情報を探しませんか?

関連記事

最近の記事

人気のページ

スポンサーリンク
 

過去ログ

2020 : 01 02 03 04 05 06 07 08 09 10 11 12
2019 : 01 02 03 04 05 06 07 08 09 10 11 12
2018 : 01 02 03 04 05 06 07 08 09 10 11 12
2017 : 01 02 03 04 05 06 07 08 09 10 11 12
2016 : 01 02 03 04 05 06 07 08 09 10 11 12
2015 : 01 02 03 04 05 06 07 08 09 10 11 12
2014 : 01 02 03 04 05 06 07 08 09 10 11 12
2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12
2003 : 01 02 03 04 05 06 07 08 09 10 11 12

サイト

Vim入門

C言語入門

C++入門

JavaScript/Node.js入門

Python入門

FreeBSD入門

Ubuntu入門

セキュリティ入門

パソコン自作入門

ブログ

トップ


プライバシーポリシー