Experimental feature in GraalVM

設定 UTF-8 地區設定

您需要 UTF-8 地區設定才能執行某些 Ruby 應用程式。例如,我們發現 RubyGems 和 ruby/spec 需要這樣的地區設定。

如果 $LANG 環境變數已設定且

locale

沒有顯示 ="C" 且沒有警告,則不需要此設定。相反地,所有值應為 "en_US.UTF-8" 或其他地區,但仍應為 .UTF-8

基於 Fedora:RHEL、Oracle Linux 等 #

export LANG=en_US.UTF-8

基於 Debian:Ubuntu 等 #

Ubuntu

Ubuntu 版本的 locale-gen 支援引數,因此很容易

sudo apt-get install -y locales
sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8

非 Ubuntu

Debian 和其他非 Ubuntu 不支援 locale-gen 引數。您需要修改 /etc/locale.gen

# Uncomment the en_US.UTF-8 line in /etc/locale.gen
sudo sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen

# locale-gen generates locales for all uncommented locales in /etc/locale.gen
sudo locale-gen
export LANG=en_US.UTF-8

適用於 Dockerfile

# Uncomment the en_US.UTF-8 line in /etc/locale.gen
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen
# locale-gen generates locales for all uncommented locales in /etc/locale.gen
RUN locale-gen
ENV LANG=en_US.UTF-8

與我們聯繫