[RUBY] What to do if you should have installed Rails but an error occurs with rails -v (for beginners)

I've been installing rails according to the blog post

$ rails -v

I got the following error.

$ rails -v

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

I read various articles and tried to solve it, but it didn't work, restarted the terminal and checked the version again.

rails -v
Rails 6.1.0

Oh my god It will be installed! !!

If you are a beginner and get an error with rails -v, restart the terminal! !!

Recommended Posts

What to do if you should have installed Rails but an error occurs with rails -v (for beginners)
[Rails] What to do if you can't get an error message with the errors method
What to do if you get an error during rails db: reset
What to do if an ActionController :: UnknownFormat error occurs
What to do if you have installed Java for OS X on macOS
What to do when you launch an application with rails
What to do if you installed Ruby with rbenv but the version does not change
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 in Basic authentication during Rails test code
[Rails] What to do if you can't get parameters with form_with
<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 you get a "Mysql2 :: Error: Operand should contain 1 column (s)" error in Rails
What to do if an SSH key authentication error occurs during automatic deployment to EC2 with Capistrano
What to do if you get an uninitialized constant Likes Controller error
What to do if an error occurs when nokogiri enters when bundle install
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 you get an error with bundle install by entering gem'bcrypt' in your Gemfile
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 an "A server is already running." Error when you try to start the rails server
After installing'devise''bootstrap' of gemfile with rails, what to do when url is an error
What to do if you get the error Couldn't find Item without an ID
# What to do if you accidentally do rails db: migrate: drop
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
What to do if you can't use the rails command
[Ruby] The gem should have been installed in vendor / bundle, but an error occurs in require
What to do if you get a "302" error in your controller unit test code in Rails
What to do if you get angry with "ERROR: There are no scenarios; must have at least one" even though you should have entered yarn in Docker
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
[Spring Boot] What to do if an HttpMediaTypeNotAcceptableException occurs on an endpoint for which produces is set
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
What to do if the app is not created with the latest Rails version installed when rails new
What to do if an error occurs when doing npm install axios in React + Typescript project
What to do if you install Ubuntu
Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error
What you can do with ruby ​​Quick reference teaching materials (for beginners)
What to do and how to install when an error occurs in DXRuby 1.4.7
What to do if you get the error Too long with no output (exceeded 10m0s) on CircleCI
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 a SQLite3 :: BusyException: database is locked error
What to do if you get the error message unrecognized selector send to instance "***"
[Rails] What to do if you get an error saying "Could not find a JavaScript runtime." When executing the rails s command on Catalina
What to do if you have enabled Use the WSL2 based engine in Docker Desktop with insufficient WSL2 installation
[Error resolution] Occurs when trying to build an environment for spring with docker
What to do if you push incorrect information
What to do if you get angry if you don't have nokogiri while installing wp2txt
What to do if ffi installation fails when launching an application in Rails
How to translate the error message into Japanese (What to do if you cannot log in for some reason)
[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
[Rails] What to do when you want to generate an error that cannot be destory when foreign key restrictions are applied
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 you can't find your API key after deploying to Rails heroku
What to do if you get a port error when docker-compose up on Mac
What to do if you cannot execute with the command "Java package name / class name"
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if rails server can't be stopped