加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – rails服务器上的ruby无法启动

发布时间:2020-12-17 03:55:55 所属栏目:百科 来源:网络整理
导读:参见英文答案 TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows????????????????????????????????????8个 嗨,当我尝试运行rails服务器时,它只是退出并显示以下消息: C:rails_projectfirst_apprails s= Booting WEBrick= Rails
参见英文答案 > TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows????????????????????????????????????8个
嗨,当我尝试运行rails服务器时,它只是退出并显示以下消息:

C:rails_projectfirst_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服务器将启动.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读