Home>
Premise

Currently, we are building an environment with Ruby on Rails.
When I installed the rails gem on my Mac terminal, I got the following message:

Error message
~% gem install rails
Failed to load /Users/user/.gemrc, (<unknown>): control characters are not allowed at line 1 column 1

When I was investigating why .gemrc was not installed, I speculated that it was because I had previously typed the following command.

Corresponding source code
$echo "gem: --no-document" >>~/.gemrc
I want to achieve

I would like to know if there is a command to cancel the above settings.

What I tried

I looked up other similar articles, but none of them showed me how to unlock them.
I also looked up Linux commands similar to MacOS terminals, but couldn't find a command that matched what I wanted to solve.

Supplementary information (FW/tool version, etc.)

ruby version: 2.5.0p0
Rails version: 6.0.3.4
macOS Big Sur version: 11.0.1

  • Answer # 1

    I would like to know if there is a command to cancel the above settings.

    Simply.gemrcIsn't it just a matter of deleting the file?

  • Answer # 2

    It is solved.
    simply,$rm .gemrcWhen I entered, the above sentence did not appear.