Ramsey was elected from Pennsylvania as a Whig to the U.S. House of Representatives and served in the 28th and 29th congresses from March 4 , 1843 to March 3 , 1847 . Alexander Ramsey was elected from Pennsylvania as a Whig to the U.S. House of Representatives and served in the 28th and 29th congresses from March 4 , 1843 to March 4 , 1847 .