Search code examples
ruby-on-railsrubyubuntu

ArgumentError: Invalid Timezone: Kyiv (ArgumentError) on Ubuntu Ruby On Rails


while Ruby on Rails project setup I faced this error:

bin/rails aborted!
ArgumentError: Invalid Timezone: Kyiv (ArgumentError)

      ActiveSupport::TimeZone[time_zone] || raise(ArgumentError, "Invalid Timezone: #{time_zone}")

It's failing when I set:

    config.time_zone = "Kyiv"

My versions are:

ruby-3.3.5
gem "rails", "\~\> 7.2", "\>= 7.2.0"
Ubuntu 24.10
Postgres 17

I'm not sure is this related to local system config or database setup

I tried changing Postgres versions to lower and also changing system language, no luck with that


Solution

  • Have you tried config.time_zone = "Europe/Kyiv"? or config.time_zone = "Europe/Kiev" ?