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 if an ActionController :: UnknownFormat error occurs
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
no space left on device What to do if an error occurs
What to do if an error occurs when doing npm install axios in React + Typescript project
wildflly10 java8 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906 What to do if an error occurs
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
[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 angry with OpenSSL with pyenv install
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.
What to do if you can't install the plugin from the Eclipse marketplace
What to do if you get Could not locate Gemfile or .bundle / directory
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
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 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
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
What to do when an error occurs in rails db: migrate ((StandardError: An error has occurred, this and all later migrations canceled :))
Error when bundle install
What to do when an error (StandardError: An error has occurred, this and all later migrations canceled:) appears in rails db: migrate
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
What to do if a SAX Parser error occurs when using Liferay 7 / DXP on AWS
What to do if you get a "302" error in your controller unit test code in Rails
What to do if you get a java.io.IOException in GlassFish
[Rails] What is the difference between bundle install and bundle update?
What to do if FacesMessage is set but not displayed
What happened in "Java 8 to Java 11" and how to build an environment
What to do if the adb command cannot be executed
What to do if you can't use the rails command
What to do if you get an error saying Cannot find a valid baseurl for repo when you use yum -y install docker in a udemy course using CentOS7
[Rails] What to do when the error No database selected and Unknown database appears in db: migrate
Notes on what to do if Ubuntu 20.04 installation on Virtual box 6.1 (Windows10) fails with "Error 5 Input / output error"
What to do if you go offline due to SSL certificate error when running Jenkins on Mac
[Spring Boot] What to do if an HttpMediaTypeNotAcceptableException occurs on an endpoint for which produces is set
[Programming beginner] What to do when rails s becomes an error in the local development environment