10

Hi, when I try to run rails server, it just exits and displays the message below:

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)

Could somebody let me know what i am missing?

ekremkaraca
  • 1,453
  • 2
  • 18
  • 37
agent_bean
  • 1,493
  • 1
  • 16
  • 30
  • did you run `bundle install` to install all needed gems? maybe `gem install tzinfo-data` needs to be done manually on windows? – house9 Apr 12 '14 at 22:12
  • DL is deprecated, please use Fiddle Fetching gem metadata from https://rubygems.org/.......... Fetching additional metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.2.2 Using i18n 0.6.9 Using json 1.8.1 Using minitest 5.3.2 Using thread_safe 0.3.3 – agent_bean Apr 12 '14 at 22:31
  • Using mime-types 1.25.1 Using polyglot 0.3.4 Using treetop 1.4.15 Using mail 2.5.4 Using actionmailer 4.1.0 Using activemodel 4.1.0 Using arel 5.0.0 Using activerecord 4.1.0 Using bundler 1.6.1 Using coffee-script-source 1.7.0 Using execjs 2.0.2 Using coffee-script 2.2.0 Using thor 0.19.1 Using railties 4.1.0 Using coffee-rails 4.0.1 Using hike 1.2.3 Using multi_json 1.9.2 Using jbuilder 2.0.6 Using jquery-rails 3.1.0 Using tilt 1.4.1 Using sprockets 2.11.0 Using sprockets-rails 2.1.3 Using rails 4.1.0 Using rdoc 4.1.1 Using sass 3.2.19 Using sass-rails 4.0.3 Using sdoc 0.4.0 – agent_bean Apr 12 '14 at 22:32
  • Using sqlite3 1.3.9 Using turbolinks 2.2.2 Using uglifier 2.5.0 Your bundle is updated! C:\rails_project\first_app> – agent_bean Apr 12 '14 at 22:33
  • 1
    thanks for the suggestions. i just removed my previous installation of ruby on rails and reinstalled it works now. – agent_bean Apr 12 '14 at 23:04
  • solution: https://stackoverflow.com/questions/54191982/tzinfo-data-issue-when-starting-new-rails-project – Pavan Kumar V Oct 04 '22 at 07:56

3 Answers3

13

I don't know if you're still with that problem, i was struggling with the same issue, until after a couple weeks i finally solved it. that is a problem with x64 machines.

just go to your gemfile and search for gem 'tzinfo-data'

then in the array add this :x64_mingw

it must look like this

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

then save, do bundle update and then bundle install, and luckyly your rails server will start.

No Idea For Name
  • 11,411
  • 10
  • 42
  • 70
DanielHolguin
  • 305
  • 4
  • 13
3

Sounds like you need:

gem install tzinfo

I have tzinfo 1.1.0 installed on my machine.

Another package you might need is:

gem install tzinfo-data

Be sure to add it to your Gemfile:

gem 'tzinfo-data', '1.2014.5'
beautifulcoder
  • 10,832
  • 3
  • 19
  • 29
1

FYI the error you're getting is probably down to the use of config.time_zone in your app. The error is saying that to interpret the correct timezone, it needs to use the tzinfo dependency

Community
  • 1
  • 1
Richard Peck
  • 76,116
  • 9
  • 93
  • 147