Rails start web server error

本文解决在Window环境下使用Rails4.1遇到的TZInfo::DataSourceNotFound错误,通过安装tzinfo-data gem来解决时间区数据源缺失的问题。

window下rails4.1 发生TZInfo::DataSourceNotFound 错误

error message log:

c:\Louzt\Ruby\first_app>rails server
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http://0.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)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/dat
a_source.rb:196:in `create_default_data_source'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/dat
a_source.rb:62:in `block in get'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/dat
a_source.rb:61:in `synchronize'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/dat
a_source.rb:61:in `get'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/tim
ezone.rb:601:in `data_source'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/tim
ezone.rb:114:in `get'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/tim
ezone_proxy.rb:84:in `real_timezone'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/tim
ezone_proxy.rb:52:in `period_for_utc'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/tim
ezone.rb:524:in `current_period'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/core_ext/object/try.rb:45:in `public_send'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/core_ext/object/try.rb:45:in `try'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/values/time_zone.rb:223:in `utc_offset'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/values/time_zone.rb:396:in `block in []'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/values/time_zone.rb:396:in `tap'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/values/time_zone.rb:396:in `[]'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/core_ext/time/zones.rb:60:in `find_zone!'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/act
ive_support/railtie.rb:20:in `block in <class:Railtie>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/in
itializable.rb:30:in `instance_exec'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/in
itializable.rb:30:in `run'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/in
itializable.rb:55:in `block in run_initializers'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'

        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in
each_strongly_connected_component'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connec
ted_component_from'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strong
ly_connected_component'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:180:in `each'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connec
ted_component'
        from C:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/in
itializable.rb:54:in `run_initializers'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/ap
plication.rb:288:in `initialize!'
        from c:/Louzt/Ruby/first_app/config/environment.rb:5:in `<top (required)
>'
        from c:/Louzt/Ruby/first_app/config.ru:3:in `require'
        from c:/Louzt/Ruby/first_app/config.ru:3:in `block in <main>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder
.rb:55:in `instance_eval'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder
.rb:55:in `initialize'
        from c:/Louzt/Ruby/first_app/config.ru:in `new'
        from c:/Louzt/Ruby/first_app/config.ru:in `<main>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder
.rb:49:in `eval'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder
.rb:49:in `new_from_string'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder
.rb:40:in `parse_file'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.
rb:277:in `build_app_and_options_from_config'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.
rb:199:in `app'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/server.rb:50:in `app'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.
rb:314:in `wrapped_app'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/server.rb:130:in `log_to_stdout'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/server.rb:67:in `start'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/commands_tasks.rb:81:in `block in server'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/commands_tasks.rb:76:in `tap'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/commands_tasks.rb:76:in `server'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands/commands_tasks.rb:40:in `run_command!'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.1.0/lib/rails/co
mmands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

resolution:

change your gemfile

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin , :x64_mingw]

 

then run:

bundle update and bundle install

restart server

rails server

内容概要:本文介绍了ENVI Deep Learning V1.0的操作教程,重点讲解了如何利用ENVI软件进行深度学习模型的训练与应用,以实现遥感图像中特定目标(如集装箱)的自动提取。教程涵盖了从数据准备、标签图像创建、模型初始化与训练,到执行分类及结果优化的完整流程,并介绍了精度评价与通过ENVI Modeler实现一键化建模的方法。系统基于TensorFlow框架,采用ENVINet5(U-Net变体)架构,支持通过点、线、面ROI或分类图生成标签数据,适用于多/高光谱影像的单一类别特征提取。; 适合人群:具备遥感图像处理基础,熟悉ENVI软件操作,从事地理信息、测绘、环境监测等相关领域的技术人员或研究人员,尤其是希望将深度学习技术应用于遥感目标识别的初学者与实践者。; 使用场景及目标:①在遥感影像中自动识别和提取特定地物目标(如车辆、建筑、道路、集装箱等);②掌握ENVI环境下深度学习模型的训练流程与关键参数设置(如Patch Size、Epochs、Class Weight等);③通过模型调优与结果反馈提升分类精度,实现高效自动化信息提取。; 阅读建议:建议结合实际遥感项目边学边练,重点关注标签数据制作、模型参数配置与结果后处理环节,充分利用ENVI Modeler进行自动化建模与参数优化,同时注意软硬件环境(特别是NVIDIA GPU)的配置要求以保障训练效率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值