我想啟動紅寶石服務器。
我安裝:
gem install bundler
gem install sqlite3
gem install webpacker
gem install rails
我創建了一個新的 rails 應用程式。
gem new test_app
也該運行服務器了:
cd test_app
rails server
但我采取如下所示的錯誤
=> Booting Puma
=> Rails 7.0.3 application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:159:in `rescue in create_default_data_source': tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install (TZInfo::DataSourceNotFound)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:156:in `create_default_data_source'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:55:in `block in get'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `synchronize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/tzinfo-2.0.4/lib/tzinfo/data_source.rb:54:in `get'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-7.0.3/lib/active_support/railtie.rb:88:in `block in <class:Railtie>'
以及類似的錯誤
uj5u.com熱心網友回復:
將此 gem 添加到您的 gemfile.rb
gem“tzinfo-data”,平臺:%i[mingw mswin x64_mingw jruby]
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/493386.html