You are not logged in.

#1 2017-02-03 17:27:56

peyloride
Member
Registered: 2016-05-26
Posts: 11

/usr/share/zoneinfo/utc is empty, rails fails because of that?

When i do rails db:migrate:

/home/peyloride/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/home/peyloride/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/home/peyloride/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
rails aborted!
ArgumentError: Invalid Timezone: UTC
/home/peyloride/rails_projects/my-bookshelf-peyloride/config/environment.rb:5:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `require'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
TZInfo::InvalidTimezoneIdentifier: Expected 44 bytes reading '/usr/share/zoneinfo/UTC', but got 0 bytes
/home/peyloride/rails_projects/my-bookshelf-peyloride/config/environment.rb:5:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `require'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
TZInfo::InvalidZoneinfoFile: Expected 44 bytes reading '/usr/share/zoneinfo/UTC', but got 0 bytes
/home/peyloride/rails_projects/my-bookshelf-peyloride/config/environment.rb:5:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `require'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/rails:9:in `<top (required)>'
/home/peyloride/rails_projects/my-bookshelf-peyloride/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

As you can see it tries to reach /usr/share/zoneinfo/utc but its completely empty. Also i tried to use cat on that point but nothing appears. What did i do wrong?

Last edited by peyloride (2017-02-03 17:30:11)

Offline

#2 2017-02-03 17:42:33

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: /usr/share/zoneinfo/utc is empty, rails fails because of that?

$ ls -la /usr/share/zoneinfo/UTC 
-rw-r--r-- 6 root root 127 Nov 24 20:51 /usr/share/zoneinfo/UTC

It appears the file is corrupted.  The following confirm it.

$ pacman -Qkk tzdata

If it is corrupted reinstalling the package should correct it.  It may also be advisable to check other packages for corruption.

Offline

#3 2017-02-03 17:45:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: /usr/share/zoneinfo/utc is empty, rails fails because of that?

Assuming you're actually looking at "UTC" and not "utc" (case matters in *nix), reinstall the tzdata package.

Offline

#4 2017-02-03 18:50:21

peyloride
Member
Registered: 2016-05-26
Posts: 11

Re: /usr/share/zoneinfo/utc is empty, rails fails because of that?

loqs wrote:
$ ls -la /usr/share/zoneinfo/UTC 
-rw-r--r-- 6 root root 127 Nov 24 20:51 /usr/share/zoneinfo/UTC

It appears the file is corrupted.  The following confirm it.

$ pacman -Qkk tzdata

If it is corrupted reinstalling the package should correct it.  It may also be advisable to check other packages for corruption.


$ pacman -Qkk tzdata didnt solve problem but reinstalling did. Thank you everyone!

Offline

#5 2017-02-03 19:10:57

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: /usr/share/zoneinfo/utc is empty, rails fails because of that?

peyloride wrote:

$ pacman -Qkk tzdata didnt solve problem

It was not meant to solve the problem simply verify that the files attributes differed from those recorded in the mtree.

-k --check
           Check that all files owned by the given package(s) are present on
           the system. If packages are not specified or filter flags are not
           provided, check all installed packages. Specifying this option
           twice will perform more detailed file checking (including
           permissions, file sizes, and modification times) for packages that
           contain the needed mtree file.

If you are satisfied the issue has been resolved please mark your thread as solved by editing the first post and prepending the tag [SOLVED] to the title in the "Subject" field

Offline

Board footer

Powered by FluxBB