Uninitialized Constant TZInfo::InvalidTimezoneIdentifier (NameError) - Rails 4

别等时光非礼了梦想. 提交于 2019-11-29 16:34:21

Requiring the tzinfo gem before initializing the app in environment.rb fixes the issue for me. Doesn't really explain everything, but seems to work

# adding this fixes the issue
require 'tzinfo'

# Initialize the rails application
RailsApp::Application.initialize!

Edit: Seems this was a problem with Rails: https://github.com/rails/rails/issues/13553

This worked for me:

gem uninstall tzinfo
#select 'All versions'
gem install tzinfo
rails c
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!