아름이의 개발로그

[TIL(Today I Learned)] 20210304 목

|
  • Rails의 update_all은 updated_at을 update하는 callback을 부르지 않는다.
    그래서 update_all로 update하면 updated_at이 최신화 되지 않는다.
    (참고)[https://stackoverflow.com/questions/18873125/updating-timestamps-with-update-all/18873228]

  • Git에 한글이 깨지는 문제가 있어서 언어 설정을 하려다가 Git의 명령어를 알게 되었다.
    # 설정 넣기
    git config --global i18n.commitEncoding utf-8
    git config --global i18n.logOutputEncoding utf-8
    
    # 설정 제거하기
    git config --unset --global i18n.commitEncoding utf-8
    git config --unset --global i18n.logOutputEncoding utf-8
    
  • 맥 터미널에서는 한글이 보이는데 ssh로 원격으로 서버에 접속했을 때는 한글이 깨지는 문제가 있었다. 맥 기본 언어가 영어여서 생긴 문제.
    export LC_ALL=ko_KR.UTF-8
    

    을 설정하고 해결.

    터미널을 껐다 켰을 때도 적용되도록 하기 위해서 아래와 같이 설정하였다.

    # bash를 사용하는 경우
    vi ~/.bashrc
    export LC_ALL=ko_KR.UTF-8
    source ~/.bashrc
    
    # zsh를 사용하는 경우
    vi ~/.zshrc
    export LC_ALL=ko_KR.UTF-8
    source ~/.zshrc
    

Comments