Revert "upgrade ruby and rails version, and other gems"

This reverts commit f367945de789b238a46fcaa5b46fc083baa398ae.