fix issues with Rails environment setup