Gem 安装 mysql2 时提示 missing psych

perfectfoolish · January 10, 2013 · Last by rubyrails replied at January 16, 2013 · 2863 hits

fuleis-MacBook-Air:etc cow$ gem install mysql2 /Users/cow/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/yaml.rb:56:in `': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. Fetching: mysql2-0.3.11.gem (100%) Building native extensions. This could take a while... Successfully installed mysql2-0.3.11 1 gem installed Installing ri documentation for mysql2-0.3.11... Installing RDoc documentation for mysql2-0.3.11...

@daqing 我需要 brew install libyaml 后 rvm install 1.9.3 --with-gcc=clang

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz ./configure --prefix=/home/serve/ruby make && make install

You need to Sign in before reply, if you don't have an account, please Sign up first.