warning when running the bundle install command

0

I have just installed Rails in its version 5.1 and when creating a new project and run the command bundle install me the following message.

The dependency tzinfo-data (> = 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java .

    
asked by develop12 30.05.2017 в 20:14
source

2 answers

2

The message is harmless and you can ignore it; in fact it is shown because you are probably not using windows, however your Gemfile has the line as shown by Vicente in his answer (rails adds it by default):

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

The objective of this line is to include the gem tzinfo-data in windows, which is used to obtain information about time zones .

If you still want to delete the message, simply delete the platforms option:

gem 'tzinfo-data'

and execute bundle update .

Or, you can delete it completely, but consider that it will generate an error if you get to run your application in Windows.

    
answered by 30.05.2017 в 22:33
1

in the Gemfile file of your app, look to see if where you have it referenced something like this appears:

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

If not, put it like this in case you are using windows

    
answered by 30.05.2017 в 20:25