我不断收到以下错误。我尝试了很多方法来解决它,包括将'tzinfo-data'添加到Gemfile中。请帮助,这让我发疯:
C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/a
ctive_support/railtie.rb:39:in `rescue in block in <class:Railtie>': tzinfo-data
is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle inst
all (TZInfo::DataSourceNotFound)
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/
lib/active_support/railtie.rb:36:in `block in <class:Railtie>
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/initializable.rb:32:in `instance_exec'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/initializable.rb:32:in `run'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/initializable.rb:61:in `block in run_initializers'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:228:in `block in tsor
t_each'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:350:in `block (2 leve
ls) in each_strongly_connected_component'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly
_connected_component_from'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:349:in `block in each
_strongly_connected_component'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in `each'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in `call'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly
_connected_component'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/initializable.rb:60:in `run_initializers'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/application.rb:361:in `initialize!'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/railtie.rb:190:in `public_send'
from C:/Users/swanster2/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/r
ails/railtie.rb:190:in `method_missing'
from hello_world.rb:117:in `<main>'
答案 0 :(得分:0)
您需要在Gemfile中确定适合适当架构的gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]