Mac 下 Ruby 及一些 Gem 的安装

2014/9/12 posted in  软件配置  

Ruby 安装

# 普通安装 Ruby
rvm install ruby --with-gcc=clang 

# 编译安装 Ruby Debug
rvm install ruby --with-gcc=clang --debug -j 3 -- --enable-shared optflags="-O0 -ggdb" debugflags="-ggdb3"

Gems 安装

  • Thrift

    gem install thrift -- --with-cppflags='-D_FORTIFY_SOURCE=0'
    
  • libv8

    gem install therubyracer -v '0.12.1'
    gem install libv8 -v '3.16.14.3' -- --with-system-v8
    
  • mysql2

    gem install mysql2 -v 0.3.11 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib