Trying to fix Rails 4 error