In gmail click the settings link in the upper right hand corner

Then scroll to the bottom and select 'Always use https' in the Browser connection section

Using Postgresql I ran into the following error when trying to create a new record through my rails application
Found this link which had the needed fix;
Dealing with 'duplicate key violates unique constraint' on the primary key
apparently with Postgresql after bulk loading records where the auto incrementing id is specified you then need to update the sequence value