[gem] minor gem updates.
[Rails] upgrade Rails to 4.0.4.