Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error

Appearance of error

To Japaneseize error messages with Rails5 Add the following to Gemfile

gem 'rails-i18n', '~> 6.0.0'

Then at the terminal

$ bundle install

When I execute, the following error occurs and installation is not possible.


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`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In snapshot (Gemfile.lock):
    railties (= 5.2.4.3)

  In Gemfile:
    coffee-rails (~> 4.2) was resolved to 4.2.2, which depends on
      railties (>= 4.0.0)

    rails (~> 5.2.4, >= 5.2.4.3) was resolved to 5.2.4.3, which depends on
      railties (= 5.2.4.3)

    rails-i18n (~> 6.0.0) was resolved to 6.0.0, which depends on
      railties (>= 6.0.0, < 7)

    sass-rails (~> 5.0) was resolved to 5.1.0, which depends on
      railties (>= 5.2.0)

    web-console (>= 3.3.0) was resolved to 3.7.0, which depends on
      railties (>= 5.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Error cause

gem 'rails-i18n', '~> 6.0.0'

The version specification was incorrect. The above version was for rails 6.

Solution

The version of rails this time was rails5, so in that case,

gem 'rails-i18n', '~> 5.1'

If so, OK! !!

afterwards,

$ bundle install

After executing, the installation was successful.

Recommended Posts

Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error
What to do if an error occurs when nokogiri enters when bundle install
What to do if mysql2 gets a bundle install error
What to do and how to install when an error occurs in DXRuby 1.4.7
What to do if an ActionController :: UnknownFormat error occurs
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
What to do if you install Ubuntu
What to do if you get an error during rails db: reset
What to do if you get an uninitialized constant Likes Controller error
no space left on device What to do if an error occurs
What to do if you get an error when you hit Heroku logs
What to do if an error occurs when doing npm install axios in React + Typescript project
What to do if you can't bundle update and bundle install after installing Ruby 3.0.0 in the Rails tutorial
wildflly10 java8 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906 What to do if an error occurs
What to do if you get an error on heroku rake db: migrate
What to do if you get the error Couldn't find Item without an ID
After setting database to mysql, bundle install causes an error
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do after Vagrant install
[Rails] What to do if you can't get an error message with the errors method
What to do if you get an error in Basic authentication during Rails test code
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you get angry with OpenSSL with pyenv install
[Note] What to do if bundle install in Chapter 3 of the rails tutorial is not possible
What to do if an SSH key authentication error occurs during automatic deployment to EC2 with Capistrano
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
I get an error with bundle install and puma cannot be installed.
[Composer] [Laravel] What to do if you cannot install due to insufficient memory
What to do if you can't install the plugin from the Eclipse marketplace
What to do if you should have installed Rails but an error occurs with rails -v (for beginners)
What to do if an error occurs in VS Code when importing a django module or your own module installed by pip install
What to do if you get Could not locate Gemfile or .bundle / directory
What to do if you get the error message unrecognized selector send to instance "***"
bundle install error
What to do if the server tomcat dies
What to do if you get an "A server is already running." Error when you try to start the rails server
Error with bundle install after upgrading to Catalina
What to do if you push incorrect information
What to do if mvn archetype: generate fails
bundle install error
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if ffi installation fails when launching an application in Rails
[Java] What to do if you get an error in Eclipse saying "Not allowed at source level below 1.X"
What to do if you get an Argument Error: wrong number of arguments (given 2, expected 0) in your RSpec test
What to do if you get an error saying "Please enter a valid value" when getting with Rails datetime_field
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
After installing'devise''bootstrap' of gemfile with rails, what to do when url is an error
What to do if you get a wrong number of arguments error in binding.pry
What to do if you can't get the text of an element in Selenium
What to do if Failure / Error: require File.expand_path ('../ config / environment', __dir__) appears in RSpec
What to do if the JSONHint annotation does not work with lombok and JSONIC
What to do if you get a port error when docker-compose up on Mac
What to do if the breakpoint is shaded and does not stop during debugging
What to do if the debug gem installation fails
What to do if the Rails server can't start
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if rails server can't be stopped
What to do if TextToSpeech doesn't work on Android 11
What to do if you accidentally create a model
What to do when a null byte error occurs