fixed errors for rails 4.1 Images not correctly loading

@sunwooz did it with me