Rails server nie łączy pod windows 8

  • Windows 8 64-bit
  • Ruby 2.1.5p723 (64-bit)
  • Rails 4.1.8

Nie mogę połączyć się z localhost:3000 pod windows 8, mimo iż ruby nie wyrzuca błędów.
Jak naprawić błąd z ustaleniem strefy czasowej? (zdaje się że w tym problem?)

C:\Ruby\FabLab\blog>rails server
=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.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:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:182:in `
rescue in create_default_data_source': No source of timezone data could be found
. (TZInfo::DataSourceNotFound)
Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving th
is error.
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_sourc
e.rb:179:in `create_default_data_source'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_sourc
e.rb:40:in `block in get'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_sourc
e.rb:39:in `synchronize'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/data_sourc
e.rb:39:in `get'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.r
b:629:in `data_source'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.r
b:92:in `get'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone_p
roxy.rb:67:in `real_timezone'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone_p
roxy.rb:30:in `period_for_utc'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/lib/tzinfo/timezone.r
b:549:in `current_period'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/core_ext/object/try.rb:45:in `public_send'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/core_ext/object/try.rb:45:in `try'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/values/time_zone.rb:223:in `utc_offset'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/values/time_zone.rb:396:in `block in []'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/values/time_zone.rb:396:in `tap'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/values/time_zone.rb:396:in `[]'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/core_ext/time/zones.rb:60:in `find_zone!'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_sup
port/railtie.rb:20:in `block in <class:Railtie>'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializ
able.rb:30:in `instance_exec'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializ
able.rb:30:in `run'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializ
able.rb:55:in `block in run_initializers'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_st
rongly_connected_component'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_com
ponent_from'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_conn
ected_component'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:345:in `each'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:345:in `call'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_com
ponent'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
        from C:/Ruby/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializ
able.rb:54:in `run_initializers'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/applicati
on.rb:300:in `initialize!'
        from C:/Ruby/FabLab/blog/config/environment.rb:5:in `<top (required)>'
        from C:/Ruby/FabLab/blog/config.ru:3:in `require'
        from C:/Ruby/FabLab/blog/config.ru:3:in `block in <main>'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:
in `instance_eval'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:
in `initialize'
        from C:/Ruby/FabLab/blog/config.ru:in `new'
        from C:/Ruby/FabLab/blog/config.ru:in `<main>'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:
in `eval'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:
in `new_from_string'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:
in `parse_file'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:
in `build_app_and_options_from_config'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:
in `app'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
server.rb:50:in `app'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:
in `wrapped_app'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
server.rb:130:in `log_to_stdout'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
server.rb:67:in `start'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
commands_tasks.rb:81:in `block in server'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
commands_tasks.rb:76:in `tap'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
commands_tasks.rb:76:in `server'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/
commands_tasks.rb:40:in `run_command!'
        from C:/Ruby/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.
rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

C:\Ruby\FabLab\blog>

Rozwiązanie problemu z tzinfo dla Windows 8 64-bit: https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors

1 Like

Witaj proponuje przejść na linuxa