SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
Rails の環境を作成する際に、以下のメッセージが出た。
$ bundle install –local
Could not find mysql2-0.3.11 in any of the sources
Run bundle install to install missing gems.
mysql2-0.3.11 が不足しているようだ。
個別にインストールする。
$ gem install mysql2 -v 0.3.11
Building native extensions. This could take a while…
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/xxxx/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
checking for rb_thread_blocking_region()… yes
checking for rb_wait_for_single_fd()… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
…
しかし、エラーになった。
MySQL をインストールしていなかったので出た模様。
HomeBrew を使用して、MySQL をインストールする。
$ brew update
$ cd /usr/local
$ brew versions mysql
5.6.12 git checkout ba37612 Library/Formula/mysql.rb
5.6.10 git checkout 48f7e86 Library/Formula/mysql.rb
5.5.29 git checkout 336c976 Library/Formula/mysql.rb
5.5.28 git checkout 5825f62 Library/Formula/mysql.rb
5.5.27 git checkout 93aecfa Library/Formula/mysql.rb
…バージョン5.5系が欲しかったので、git から取得
$ git checkout 336c976 Library/Formula/mysql.rb
$ brew install mysql
==> Downloading http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.29.tar.gz/from/http://cdn.mysql.com/
curl: (7) couldn’t connect to host
Error: Download failed: http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.29.tar.gz/from/http://cdn.mysql.com/
ここでもエラーでコケる。
この後、プロキシの設定などを行なってみるが結果変わらず。
バージョンの指定を指定なかったので、バージョンを付けてインストールしてみる
$ brew install mysql55
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.30.tar.gz
######################################################################## 100.0%
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql55/5.5.30 -DMYSQL_DATADIR=/usr/local/var/mysql55 -DINSTALL_MAN
==> make
==> make install
==> /usr/local/Cellar/mysql55/5.5.30/bin/mysql_install_db –verbose –user=xxxx –basedir=/usr/local/Cellar/mysql
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the –basedir option
pointing to that location.
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
バージョン指定が大切だったのか。