Fixing some undefined constants in rails 4.1