• 首页

/home/live/.rvm/gems/ruby-2.0.0-p576@global/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require’: Incorrect MySQL client library version! This gem was compiled for 5.6.16 but the client library is 5.5.40. (RuntimeError)

/home/live/.rvm/gems/ruby-2.0.0-p576@global/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require’: Incorrect MySQL client library version! This gem was compiled for 5.6.16 but the client library is 5.5.40. (RuntimeError)

ubuntu环境

解决办法

LoadError – library not found for class Digest::HMAC — digest/hmac

LoadError – library not found for class Digest::HMAC — digest/hmac

Question?

solution

Reference

https://github.com/code-mancers/mailgun-ruby/commit/b35ab9d9e2e936c00e6e65c17b87c942bbaa4c0c

https://github.com/mailgun/mailgun-ruby/pull/16

capistrano3 shared/bin is empty

REASON

capistrano3 部署后shared/bin下没有任何的命令工具

Anyalize

Solution

vim config/deploy.rb

set :bundle_binstubs, -> { shared_path.join(‘bin’) }

why?

https://github.com/capistrano/bundler/blob/master/CHANGELOG.md

https://github.com/capistrano/bundler/pull/61

https://github.com/capistrano/bundler/issues/45#issuecomment-69349237

Reference

http://qiita.com/yuuna/items/27a561a14399c5343d2f

CentOS 设置时间同步

CentOS 设置时间同步

一、ntp

安装ntp

开机自动配置运行ntp服务

同步

定时同步

二、配置文件

how to install old version firefox in CentOS6

how to install old version firefox in CentOS6

ENV: 64-bit CentOS 6

Step1: Download Firefox Archive

the old firefox archive: https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ you can find every verison for firefox

Step2: Extract Archive

Step3: Configure Firfox

finish

apache rewriteRule removing the querystring in Apache < 2.4

apache rewriteRule removing the querystring in Apache < 2.4

Why?

eg: http://www.58share.com?query=jerry

301 redirect to: http://58share.com/jerry

在301跳转后会自动添加Query String到新跳转的地址: eg: http://58share.com/jerry?query=jerry

How?

1. apache >= 2.4

apache2.4 已经添加了 [QSD]这样一个标志位来解决这个问题

2. apache < 2.4

解决方案: 在跳转规则中尾部添加 ‘?’ 用来标示该跳转不需要将Query String 添加进去

Reference

http://www.marceldoorn.nl/en/blog/2012/august/server/rewriterule-removing-querystring-apache-24

升级ruby2.2.0后遇见的问题!

eventmachine

solve:

reference: https://github.com/eventmachine/eventmachine/issues/495

nginx + php5-fpm doesn’t work properly. get a blank page

nginx visit php get a blank page

Env

ubuntu
nginx
php5-fpm

Problem?

when I visit phpinfo page, got a blank page

how?

1.

2.

How To Set $JAVA_HOME Environment Variable On Mac OS X

How To Set $JAVA_HOME Environment Variable On Mac OS X

Usage

Why?

gem install therubyracer get error

gem install therubyracer get error

Solved

Reference

http://stackoverflow.com/questions/19697441/cannot-install-gem-therubyracer-in-os-x-mavericks