Add assets path compatibility for rails 4.

close #684