TZINFO-DATA Not Present

417 views
Skip to first unread message

Ian Lowe

unread,
Jun 4, 2017, 11:49:08 AM6/4/17
to RubyInstaller
I am new to RUBY and trying to learn. I have started by using the introductory script from IFTTT that runs a "Hello World" app.

I have downloaded and installed Ruby version 2.2.6p396 (GEM version 2.4.5.2)

I have downloaded and installed the DevKit version DevKit-mingw64-32-4.7.2-20130224-1151-sfx

I have downloaded their Rails Script and installed in in the Ruby directory

However, when I run it I get TZINFO-DATA is not present

I have created a GEMFILE with the following code
# frozen_string_literal: true
gem "tzinfo-data", platforms: [:mingw, :mswin]
# gem "rails"

and when I run Bundle Install it shows

D:\Ruby22>bundle install
Using thread_safe 0.3.6
Using bundler 1.15.1
Using tzinfo 1.2.3
Using tzinfo-data 1.2017.2
Bundle complete! 1 Gemfile dependency, 4 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

However, when I run Hello World it still tells me that tzinfo-data is not present

D:\Ruby22>ruby hello_world.rb
D:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.1.1/lib/active_support/railtie.rb:22:in `rescue in block in <class:Railtie>': tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install (TZInfo::DataSourceNotFound)
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.1.1/lib/active_support/railtie.rb:19:in `block in <class:Railtie>'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:345:in `each'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:345:in `call'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
        from D:/Ruby22/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/initializable.rb:58:in `run_initializers'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/application.rb:353:in `initialize!'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/railtie.rb:185:in `public_send'
        from D:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.1.1/lib/rails/railtie.rb:185:in `method_missing'
        from hello_world.rb:117:in `<main>'

D:\Ruby22>gem --version
2.4.5.2

D:\Ruby22>ruby --version
ruby 2.2.6p396 (2016-11-15 revision 56800) [i386-mingw32]

I must be doing something stupid for it to be failing at this early point but I am afraid my lack of experience is preventing me from solving the issue................can you help please. 

Matthaus Owens

unread,
Jun 19, 2017, 11:14:28 AM6/19/17
to rubyin...@googlegroups.com
On Sun, Jun 4, 2017 at 08:49 Ian Lowe <ianl...@gmail.com> wrote:
I am new to RUBY and trying to learn. I have started by using the introductory script from IFTTT that runs a "Hello World" app.

I have downloaded and installed Ruby version 2.2.6p396 (GEM version 2.4.5.2)

I have downloaded and installed the DevKit version DevKit-mingw64-32-4.7.2-20130224-1151-sfx

I have downloaded their Rails Script and installed in in the Ruby directory

However, when I run it I get TZINFO-DATA is not present

I have created a GEMFILE with the following code
# frozen_string_literal: true
gem "tzinfo-data", platforms: [:mingw, :mswin]
# gem "rails"

and when I run Bundle Install it shows

D:\Ruby22>bundle install
Using thread_safe 0.3.6
Using bundler 1.15.1
Using tzinfo 1.2.3
Using tzinfo-data 1.2017.2
Bundle complete! 1 Gemfile dependency, 4 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

However, when I run Hello World it still tells me that tzinfo-data is not present

When you install a gem with bundler you need to use bundler to run your app as well. 

'bundle exec ruby hello_world.rb'

Hope that helps. 
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyinstalle...@googlegroups.com.
To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/d/optout.
--
"It is impossible for the man who awakens in the morning to know with certainty that he is the same man who went to sleep at night."
Reply all
Reply to author
Forward
0 new messages