簡體   English   中英

無法在 Windows 11 中運行 Rails 服務器

[英]Can't run rails server in windows 11

我想啟動紅寶石服務器。

我安裝:

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>'

以及類似的錯誤

將此 gem 添加到您的 gemfile.rb

gem“tzinfo-data”,平台:%i[mingw mswin x64_mingw jruby]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM