参见英文答案 >
TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows 8个
嗨,当我尝试运行rails服务器时,它只是退出并显示以下消息:
嗨,当我尝试运行rails服务器时,它只是退出并显示以下消息:
C:\rails_project\first_app>rails s => Booting WEBrick => Rails 4.1.0 application starting in development on http0 0 0 0:3000 => Run `rails server -h` for more startup options => Notice: server is listening on all interfaces (0 0 0 0). Consider using 127.0 .0.1 (--binding option) => Ctrl-C to shutdown server Exiting C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:1 99:in `rescue in create_default_data_source': No timezone data source could be f ound. To resolve this,either install TZInfo::Data (e.g. by running `gem install tzinfo-data`) or specify a zoneinfo directory using `TZInfo::DataSource.set(:zo neinfo,zoneinfo_path)`. (TZInfo::DataSourceNotFound)
有人能让我知道我错过了什么吗?
解决方法
我不知道你是否仍然遇到这个问题,我正在努力解决同样的问题,直到几周后我终于解决了这个问题.这是x64机器的问题.
只需转到你的gemfile并搜索gem’tzinfo-data’
然后在数组中添加:x64_mingw
它必须看起来像这样
gem 'tzinfo-data',platforms: [:mingw,:mswin,:x64_mingw]
然后保存,捆绑更新然后捆绑安装,幸运的是你的rails服务器将启动.