4

I just install ruby on rails couple days ago and every time a create a new project in the console I got this 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 mingw, mswin, x64_mingw, jruby`.

but when I try to install like:

bundle lock --add-platform mingw

I got this message:

Could not locate Gemfile

Do you guys have some idea what I do bout this message???

  • I don't know for sure but please try to do what the message is asking you to do. Try to run bundle lock --add-platform mingw, mswin, x64_mingw, jruby and not just bundle lock --add-platform mingw. – Manish Kumar Bisht Jan 26 '17 at 18:48
  • It doesn't work It send me the same message: Could not locate Gemfile – JULIO MACHAN Jan 26 '17 at 19:05
  • There is a comprehensive guide for installing ruby on rails: gorails.com/setup/ubuntu/16.04 – Manish Kumar Bisht Jan 26 '17 at 19:15
1

Had the same problem on mac osx El capitan and this is how i solved it. FIRST this is the error message i got after running this command

$ rails new my-app -d mysql

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 mingw, mswin, x64_mingw, jruby. -Note: I tried running the command while am in the application folder where i install my apps till i had to cd my-app directory(root of my app) - Fist you cd into the root directory of the app you are creating - bundle lock --add-platform mingw, mswin, x64_mingw, jruby -To install the missing dependecies. -For my case i only did this bundle lock --add-platform jruby -And it worked like a charm try that should do the trick.

| improve this answer | |
4

This gem is unnecessary for apps that will be running on Ubuntu (or any Unix-based system) and can be safely removed from the gemfile unless your rails app is running on a Windows machine.

Per the gem's author:

If you want to get rid of the 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.
| improve this answer | |
0

The Could not locate Gemfile message is coming up because you're not in the project directory. cd into the project directory before running any bundle command.

  • cd [path/to/your/rails/project]
  • bundle lock --add-platform mingw
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.