Open nicbrink opened 7 years ago
wtf?! haha gotta love these errors. but seriously, like always, thanks for testing!
Thats kinda weird. you should get 'tzinfo' during the bundle install and that should be enough. From my understanding the tzino-data gem is required for *nix based platforms.
Whats your platform (ubuntu XX), and are you using ruby via rvm?
I'm also wondering if you can just set that variable via command line when starting hashview and it would bypass the need of installing another (semi-redundant) gem.
I do hope adding to the issues helps. My ruby skills are pretty rudimentary, but I want to be of as much assistance as possible.
This testbox is ubuntu 14.04 and I am using ruby via rvm. 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Doing a bit more testing, I dont think I need to have the tzinfo-data gem in the Gemfile.
This worked: RACK_ENV=development TZ='America/New_York' foreman start as well as adding it to background_worker.rb: ENV['TZ'] = 'America/New_York'
Strangest thing is, I did a fresh install of 0.6 and I dont encounter this problem, which is weird.
OOC what happens if you run: timedatectl | grep "Time zone" on this system. I suspect the environment variable for time zone hasnt been set and as a result hashview cant read the value properly.
Here is what I get back. It does seem to have a timezone defined. timedatectl | grep "Time zone" Time zone: America/New_York (EDT, -0400)
Strange thing I only get this error or 0.7 and not 0.6.1.
I have been fixing it by: RACK_ENV=development TZ='America/New_York' foreman start
Same error here using the latest revision (f71ed89ab21496d65ded835675e5ebbef1e755f2) on Ubuntu 16.10. @nicbrink's workaround (RACK_ENV=production TZ='Europe/Paris' foreman start
) also works for me.
bah! until we can look into this, i've updated the wiki with this workaround. Thanks guys!
https://github.com/hashview/hashview/wiki/02_Running-Hashview
On a brand new install of the 0.7 branch I receive this error when starting up.
07:28:31 web.1 | [2017-05-22 07:28:31] INFO WEBrick::HTTPServer#start: pid=23405 port=4567 07:28:32 background-worker.1 | rake aborted! 07:28:32 background-worker.1 | ArgumentError: cannot determine timezone from nil (etz:nil,tnz:"EDT",tzid:"constant") 07:28:32 background-worker.1 | Try setting'
ENV['TZ'] = 'Continent/City'
in your script (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rufus-scheduler-3.3.4/lib/rufus/scheduler/zotime.rb:41:ininitialize' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rufus-scheduler-3.3.4/lib/rufus/scheduler/zotime.rb:206:in
new' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rufus-scheduler-3.3.4/lib/rufus/scheduler/zotime.rb:206:innow' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rufus-scheduler-3.3.4/lib/rufus/scheduler.rb:561:in
start' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rufus-scheduler-3.3.4/lib/rufus/scheduler.rb:109:ininitialize' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:287:in
new' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:287:inrufus_scheduler' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:143:in
block in load_schedule_job' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:138:ineach' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:138:in
load_schedule_job' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:100:inblock in load_schedule!' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:99:in
each' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:99:inload_schedule!' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler.rb:52:in
run' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler/cli.rb:117:inrun_forever' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/resque-scheduler-4.3.0/lib/resque/scheduler/tasks.rb:18:in
block (2 levels) in <top (required)>' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/gems/rake-11.2.2/exe/rake:27:in<top (required)>' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in
eval' 07:28:32 background-worker.1 | /home/pentest/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `If I add the following line to background_worker.rb and also add "gem 'tzinfo-data'" to the Gemfile, then Hashview starts up.
backgrou_worker.rb: ENV['TZ'] = 'America/New_York'