raf*_*lez 4 ruby-on-rails tzinfo
嗨,当我尝试运行时rails server,它只是退出并显示以下消息:
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)
Run Code Online (Sandbox Code Playgroud)
有人能让我知道我错过了什么吗?
我不知道你是否仍然遇到这个问题,我正在努力解决同样的问题,直到几周后我终于解决了这个问题.这是x64机器的问题.
只需转到您的gemfile并搜索 gem 'tzinfo-data'
然后在数组中添加这个 :x64_mingw
它必须看起来像这样
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
Run Code Online (Sandbox Code Playgroud)
然后保存,捆绑更新然后捆绑安装,幸运的是你的rails服务器将启动.
听起来你需要:
gem install tzinfo
Run Code Online (Sandbox Code Playgroud)
我的机器上安装了 tzinfo 1.1.0。
您可能需要的另一个包是:
gem install tzinfo-data
Run Code Online (Sandbox Code Playgroud)
请务必将其添加到您的 Gemfile 中:
gem 'tzinfo-data', '1.2014.5'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4314 次 |
| 最近记录: |