changed to ping file to connect to the database through active record