What to do when rails creates a 〇〇 2.rb file

What to do when rails creates a 〇〇 2.rb file

environment

Mac Book Pro 2019 local environment
Edit with VS code

Cause

I'm not sure. I would appreciate it if you could let me know if you find the cause of the problem.

approach

Check the current state of git

$ git status

Now check the current state of git.

Git add your edited file

git add File edited by myself

Add files other than 〇〇 2.rb.

At this time, be careful not to add files such as 〇〇 2.rb by mistake.

Confirmation of files to delete

git clean -n -d

Check the files to be deleted.

Delete file

git clean -f -d

Then delete the file.

Check the status of git after deletion

git status

Then, check if the unnecessary files have been deleted. (〇〇 2.rb, etc.)

Commit if necessary

git commit -m "remove 2 file"

So, I think it's okay for anyone who wants to commit.

Recommended Posts

What to do when rails creates a 〇〇 2.rb file
What to do when "call'Hoge.connection' to establish a connection" appears on rails c
What to do when a null byte error occurs
What to do when you want to delete a migration file that is "NO FILE"
What to do when javax.batch.operations.JobStartException occurs
What to do when you launch an application with rails
[Ruby / Rails] What to do when NoMethodError appears when using a destructive method such as filter!
[Rails Tutorial Chapter 2] What to do when you make a mistake in the column name
[Rails] What to do when rails s does not respond or does not stop
What to do when you become a Problem During Content Assist
What to do when undefined method ʻuser_signed_in?'
What to do when you run into a docker-compose node_modules problem
[Rails] What to do when the view collapses when a message is displayed with the errors method
[Rails 6] What to do when a missing a template error occurs after introducing haml [Super easy]
What to do when Blocked Host: "host name" appears in Ruby on Rails
Notes on what to do when a WebView ClassNotFoundException occurs in JavaFX 12
[Rails] How to write when making a subquery
What to do when debugging "Source not found"
What do you use when converting to String?
What to do when IllegalStateException occurs in PlayFramework
<f: ajax> Unable to attach <f: ajax> to non-ClientBehaviorHolder What to do when you become a parent
What to do when rails db: seed does not reflect in the database
What to do when is invalid because it does not start with a'-'
What to do if ffi installation fails when launching an application in Rails
[Ubuntu] What to do when MongoDB cannot be started due to a SocketException error
What to do if the Rails server can't start
What to do when JSF tags do not become HTML
What to do if you get an "A server is already running." Error when you try to start the rails server
What to do if you accidentally create a model
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
ParseException: What to do when Unparseable date is reached
After installing'devise''bootstrap' of gemfile with rails, what to do when url is an error
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
What to do when Address already in use is displayed after executing rails s
What to do if you get a port error when docker-compose up on Mac
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 when it becomes Unable to find CDI BeanManager.
What to do when Method not found in f: ajax
What to check when rails db: migration does not pass
# What to do if you accidentally do rails db: migrate: drop
What to do when Cannot apply expression operators to method binding
What to do if mysql2 gets a bundle install error
What to do if you can't use the rails command
What to do when Cannot format given Object as a Date in convertDateTime of JSF
What to do when a could not find driver appears when connecting to a DB in a Docker environment
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
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 you need to do to open a file from the menu in the document-Based App macOS app
What to do when Rails on Docker does not reflect controller changes in the browser
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
Preparing to create a Rails application
[Rails] What to do if data is not registered in DB
[Programming beginner] What to do when rails s becomes an error in the local development environment
What to do when the changes in the Servlet are not reflected
About what I did when creating a .clj file in Clojure
What to do if you get a "Mysql2 :: Error: Operand should contain 1 column (s)" error in Rails
I get a Ruby version error when I try to start Rails.
What to do if Cloud9 is full in the Rails tutorial
What I was addicted to when implementing google authentication with rails