Skip to content

Instantly share code, notes, and snippets.

# encoding: utf-8
String.class_eval do
def strip_accents
accents = {
['à','À','ả','Ả','ã','Ã','á','Á','ạ','Ạ','ă','Ă','ằ','Ằ','ẳ','Ẳ','ẵ','Ẵ','ắ','Ắ','ặ','Ặ','â','Â','ầ','Ầ','ẩ','Ẩ','ẫ','Ẫ','ấ','Ấ','ậ','Ậ'] => 'a',
['đ','Đ'] => "d",
['è','È','ẻ','Ẻ','ẽ','Ẽ','é','É','ẹ','Ẹ','ê','Ê','ề','Ề','ể','Ể','ễ','Ễ','ế','Ế','ệ','Ệ'] => "e",
['ì','Ì','ỉ','Ỉ','ĩ','Ĩ','í','Í','ị','Ị'] => 'i',
['ò','Ò','ỏ','Ỏ','õ','Õ','ó','Ó','ọ','Ọ','ô','Ô','ồ','Ồ','ổ','Ổ','ỗ','Ỗ','ố','Ố','ộ','Ộ','ơ','Ơ','ờ','Ờ','ở','Ở','ỡ','Ỡ','ớ','Ớ','ợ','Ợ'] => "o",
@hoanghiep90
hoanghiep90 / installing-ruby-2.6.10-on-m1.md
Last active February 1, 2023 18:36
Install Ruby 2.6.10 with rbenv (M1/M2 Mac)

Problem

I ran command install ruby 2.6.10 with rbenv.

rbenv install 2.6.10

Got the error: