GithubHelp home page GithubHelp logo

Comments (7)

philr avatar philr commented on August 22, 2024 248

The warning message is coming from Bundler (rubygems/bundler#5003). It is not an error and can be ignored.

When you create a new Ruby on Rails application, a Gemfile is created including the following line that triggers the message:

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

The purpose of this line is to include the tzinfo-data gem in the bundle on Windows to act as a source of time zone data. This gem is unnecessary on Ubuntu (and Unix-based systems in general) because the system includes time zone data that can be read directly by tzinfo.

If you want to get rid of the warning message you can do one of the following:

  1. Remove the platforms option from the gem 'tzinfo-data' line in the Gemfile (and run bundle update). This will cause tzinfo to use tzinfo-data as its data source on all platforms instead of using the system time zone data.
  2. Remove the gem 'tzinfo-data' line from the Gemfile. This will cause tzinfo to always try and use the system time zone data. A TZInfo::DataSourceNotFound exception will be raised if you try and run your app on Windows.
  3. Run bundle lock --add-platform mingw, mswin, x64_mingw, jruby to add mingw, mswin, x64_mingw, and jruby to the list of platforms Bundler will include in the bundle.
  4. Run bundle config --local disable_platform_warnings true to silence the warnings (requires bundler >= 1.17.0). Thanks for @mxhold for this suggestion.

Each of these options would need to be carried out for each Rails application you create.

You can also run bundle config disable_platform_warnings true to disable the warning messages for the current user.

from tzinfo-data.

philr avatar philr commented on August 22, 2024 57

@cronwel I'm the author of tzinfo and tzinfo-data, so that's why I know how they can be used. The Gemfile syntax and bundler command are documented on the Bundler documentation site.

from tzinfo-data.

mxhold avatar mxhold commented on August 22, 2024 6

Just adding that an additional way to silence this warning is by enabling the disable_platform_warnings option for Bundler (available in versions >=1.17.0) by running:

bundle config --local disable_platform_warnings true

This will silence any platform warnings in the context of the current app. If you leave off the --local option, the warnings will be silenced globally for the current machine.

from tzinfo-data.

cronwel avatar cronwel commented on August 22, 2024 2

Thank you philr, I was wondering( and I am a new to programming) how did you learn that? I see lots off folks know great things (like you in this post), but how did you acquire that knowledge? I hope to learn how to learn when it comes to programming. Any advice would be greatly appreciated.

from tzinfo-data.

terracotta210 avatar terracotta210 commented on August 22, 2024 1

It's good to know that this is not an error, thanks for help.

from tzinfo-data.

lifesucx avatar lifesucx commented on August 22, 2024

I read philir's answer, and thank you. It is nice to know that it is not an error message, but I am no longer able to (I am sorry if this is worded badly) program in the terminal anymore. My username and the '$' and the name of the directory I am in do not show up. I can type in the line and hit enter, but it is more like I am writing a paper now. No program is executing. I have tried exiting and reopening the terminal and running the program again, but it is always the same output.

update

I closed and reopened the terminal. This time I did not get the notification at the end when the program executed, but I still am having the typing issue.

from tzinfo-data.

wanseanpark avatar wanseanpark commented on August 22, 2024

I have the pros too, I dont know how to fix it . so sad ...

from tzinfo-data.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.