Mavericks(10.9)にMikutterを入れたのでメモ

何故Mavericksなのか

Yosemiteだとhomebrew突っ込んだときに壊れるから。

いったん消去してhomebrew入れ直してもOS X慣れしてないのでなかなか自分にはハードルが高い。

それと自分用メモなのであんまり参考にしないほうがいいかも。
MacPortsでサクッといれたほうが楽かもしれない。びみょいね。

それとHomebrewが好きって理由もあるけど。
とりあえずざっくりメモ。

メモ

XcodeXQuartzダウンロード

homebrewをインストール

アプリストア上だとX code最新版10.10(Yosemite)版なので

Xcode - ダウンロード - Apple Developerから10.0.9のXcodeを入れる

Ruby周りの環境を整える

rbenv導入

brew install rbenv

そのままRuby1.9.3以上のRuby導入するためインストール可能なRuby一覧を見る

rbenv install -l

インストール可能なRubyを選択して実行(別に2.0.0p481じゃなくても良いと思う、てきとー)

rbenv install 2.0.0p481

Ruby周りはこれでOK。

brew install gtk+(多分管理者権限sudoは使わなかった気がする)
alias gcc=x86_64-apple-darwin13.1.0-gcc-4.8
sudo gem install gtk2

ちなみにここでsudo(root権限)つけないとPermissionerror吐かれます(白目)

mikutter公式からmikutterDLして解凍、好きなディレクトリに置く

Gtk+を導入

gem install gtk2

この状態だと、

ruby: Is a directory -- mikutter/ (LoadError)
Ragi-no-MacBook-Pro:~ Ragi$ cd mikutter/
Ragi-no-MacBook-Pro:mikutter Ragi$ ruby mikutter.rb 
Could not find gem 'oauth (~> 0.4) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

が出たので

で検索

Qiitaで似たようなエラーを探す

rubygems - Mac OS X Mavericksでgemをインストールしようとした時に ERROR: Failed to build gem native extension と怒られた時の対処法 - Qiita

brew install apple-gcc42でも引っかかってるようだったので

apple-gcc42のエラーの対処法を探すと

Qiitaかbundle系の解説サイトが見つかってとりあえず、

xcode-select --install

したらXcodeのgemビルド用パッケージが足りなかったらしく一発入れたらインストールできた。

どこのサイト閲覧してたのかが思い出せなくて悔しい。

通って

gem install gtk+

そのまま

cd mikutter
ruby mikutter.rb
Run `bundle install` to install missing gems.

と出たので

sudo gem install bundler

そしたらやっとこさ動きましたよ。

Last login: Sat Oct  3 20:37:19 on ttys000
Ragi-no-MacBook-Pro:~ Ragi$ xcode-select --install
xcode-select: note: install requested for command line developer tools
Ragi-no-MacBook-Pro:~ Ragi$ brew install apple-gcc42
Error: No available formula for apple-gcc42 
==> Searching formulae...
==> Searching taps...

homebrew/dupes/apple-gcc42
==> You haven't updated Homebrew in a while.
A formula for apple-gcc42 might have been added recently.
Run `brew update` to get the latest Homebrew updates!
Ragi-no-MacBook-Pro:~ Ragi$ 
Ragi-no-MacBook-Pro:~ Ragi$ sudo gem install gtk2
Password:
Building native extensions.  This could take a while...
Successfully installed glib2-3.0.5
Fetching: atk-3.0.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed atk-3.0.5
Fetching: cairo-1.14.3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed cairo-1.14.3
Fetching: pango-3.0.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed pango-3.0.5
Fetching: gdk_pixbuf2-3.0.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed gdk_pixbuf2-3.0.5
Fetching: gtk2-3.0.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed gtk2-3.0.5
Parsing documentation for glib2-3.0.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/glib2.bundle, skipping
Installing ri documentation for glib2-3.0.5
Parsing documentation for atk-3.0.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/atk.bundle, skipping
Installing ri documentation for atk-3.0.5
Parsing documentation for cairo-1.14.3
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/cairo.bundle, skipping
Installing ri documentation for cairo-1.14.3
Parsing documentation for pango-3.0.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/pango.bundle, skipping
Installing ri documentation for pango-3.0.5
Parsing documentation for gdk_pixbuf2-3.0.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/gdk_pixbuf2.bundle, skipping
Installing ri documentation for gdk_pixbuf2-3.0.5
Parsing documentation for gtk2-3.0.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/gtk2.bundle, skipping
Installing ri documentation for gtk2-3.0.5
6 gems installed
Ragi-no-MacBook-Pro:~ Ragi$ ruby mikutter/
ruby: Is a directory -- mikutter/ (LoadError)
Ragi-no-MacBook-Pro:~ Ragi$ cd mikutter/
Ragi-no-MacBook-Pro:mikutter Ragi$ ruby mikutter.rb 
Could not find gem 'oauth (~> 0.4) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- gtk2 (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/Ragi/mikutter/core/plugin/gtk/gtk.rb:5:in `<top (required)>'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:138:in `load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:138:in `load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:130:in `block in load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:127:in `each'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:127:in `load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:130:in `block in load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:127:in `each'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:127:in `load'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:97:in `block in load_all'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:37:in `block in each_spec'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:32:in `each'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:32:in `each'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:35:in `each_spec'
	from /Users/Ragi/mikutter/core/miquire_plugin.rb:95:in `load_all'
	from /Users/Ragi/mikutter/core/boot/load_plugin.rb:10:in `<top (required)>'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/Ragi/mikutter/core/miquire.rb:98:in `miquire_original_require'
	from /Users/Ragi/mikutter/core/miquire.rb:95:in `file_or_directory_require'
	from /Users/Ragi/mikutter/core/miquire.rb:76:in `block in miquire'
	from /Users/Ragi/mikutter/core/miquire.rb:75:in `each'
	from /Users/Ragi/mikutter/core/miquire.rb:75:in `miquire'
	from /Users/Ragi/mikutter/core/miquire.rb:18:in `miquire'
	from mikutter.rb:38:in `<main>'
Ragi-no-MacBook-Pro:mikutter Ragi$ 

日本語入力も勝手にできててあり〜?な感じはするけどまーいいだろう。

参考にさせて貰ったサイト

Winux/Lindows |最新Mikutter3.1で始めるておくれ最新Ruby(rbenv on LMDE 2回目)

mikutter起動せず✗ →起動した

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

Ruby - mikutter3.2.2をLinuxBean14.04でも使いたい! - Qiita

ruby - Error to install Nokogiri on OSX 10.9 Maverick? - Stack Overflow
http://foresthill.sakura.ne.jp/codex/index.php?QBlog-20150503-1

 

Copyright © 2016 ブログ名 All rights reserved.