mimikakimemo

自分用メモ。

ふたたび mikutter のインストール

1年前の記事:

Ruby のインストール

前回は RVM で Ruby を入れたが、今回は rbenv で入れてみる。

rbenv 自体のインストール

$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(rbenv init -)"' >> ~/.profile
$ source ~/.profile

Ruby をビルドするための ruby-build をインストール

$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

インストール可能な Ruby の一覧を表示

$ rbenv install -l

Ruby 2.0.0-p0 をインストール

$ rbenv install 2.0.0-p0
Downloading ruby-2.0.0-p0.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz

Installing ruby-2.0.0-p0...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20130508135518.11125
Results logged to /tmp/ruby-build.20130508135518.11125.log

Last 10 log lines:
installing default gems:      /home/*****/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
                              bigdecimal 1.2.0
                              io-console 0.4.2
                              json 1.7.7
                              minitest 4.3.2
                              psych 2.0.0
                              rake 0.9.6
                              rdoc 4.0.0
                              test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

となってコケた。OpenSSL 自体はインストール済みなのだが、

によれば、libssl-dev が必要らしい。というわけで、

$ sudo apt-get install libssl-dev

で libssl-dev を入れてから改めてインストール。

$ rbenv install 2.0.0-p0

デフォルトで 2.0.0-p0 を使うように設定。

$ rbenv global 2.0.0-p0

Ruby/GTK2 のインストール

$ sudo apt-get install libgtk2.0-dev

mikutter のインストール

$ cd ~/apps
$ git clone git://toshia.dip.jp/mikutter.git
$ mkdir -p ~/.mikutter/plugin; touch ~/.mikutter/plugin/display_requirements.rb

最後のコマンドは Display Requirements の制限を解除するため

Unity のランチャに登録

~/.local/share/applications/ に以下の内容で mikutter.desktop というファイルを作る。

[Desktop Entry]
Name=mikutter
GenericName=Twitter client
Exec=/home/USER_NAME/.rbenv/shims/ruby /home/USER_NAME/apps/mikutter/mikutter.rb
Icon=/home/USER_NAME/apps/mikutter/core/skin/data/icon.png
Terminal=false
Type=Application
Categories=Network

あとは

$ chmod +x mikutter.desktop

として、これを Unity のランチャにドラッグ&ドロップ。