2010年5月27日木曜日

rails_footnotes

git版をscript/pluginにインストールしてもだめ。
gem install rails_footnotesもだめ。


以下よりダウロードしたものをvender/pluginsにコピーしたら最新版に対応した。

http://github.com/josevalim/rails-footnotes/downloads

textmate shorcut for rails

  1. FORMAT Ctrl+Shift+H 
  2. シンタックスハイライトを消す Option+Shift+Control+D
  3. シンタックスハイライトを付ける Option+Shift+Control+H

2010年5月23日日曜日

gem install mysql on mac snow leopard

just went through the same pain... here's what worked for me:
  1. Download / install the 64-bit MySQL 5.1.37 from mysql.com
  2. run the following commands:
    sudo gem update --system
    sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
I also uninstalled all mysql gems that were floating around from my 10.5 days, that may do it if the above doesn't work for you :)

以下より引用
http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard

 .bash_profileに以下を追加
PATH=/usr/local/mysql/bin/:/Library/StartupItems/MySQLCOM/:$PATH
export PATH

起動は、mysqldではなく、mysqlcomで行わないとセキュリティエラーになる。

必ずsudoをつけること



sudo vim /etc/my.cnf を編集する。元からないので作成する。
[client]
default-character-set=utf8

[mysqld]
default-character-set = utf8
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8
 
 
 
rake db:createのエラーが発生するとき
Couldn’t create database for {”username”=>”root”, 
“adapter”=>”mysql”, “database”=>”delete_me”, “password”=>nil, 
“socket”=>”/tmp/mysql.sock”}, charset: utf8, collation: 
utf8_unicode_ci (if you set the charset manually, make sure you have a 
matching collation)  
これは、 
 上記のsudo env ARCHFLAGS="-arch x86_64" gem install mysql --  --with-mysql-config=/usr/local/mysql/bin/mysql_config
 を忘れている。