New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant update tzinfo-data #15

Closed
maheedhar1998 opened this Issue Apr 4, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@maheedhar1998

maheedhar1998 commented Apr 4, 2018

Downloading tzinfo-data-1.2013.8 revealed dependencies not in the API or the lockfile (tzinfo (>=
1.0.0)).
Either installing with --full-index or running bundle update tzinfo-data should fix the problem.

In Gemfile:
tzinfo-data

@philr

This comment has been minimized.

Member

philr commented Apr 4, 2018

Version 1.2013.8 is very old, but I would expect it to work still (the dependencies are the same as more recent versions). Have you tried the latest version (currently 1.2018.4)?

What are the full contents of your Gemfile and Gemfile.lock files?

What is the output of running the commands suggested by Bundler (adding the --full-index option or running bundle update tzinfo-data)?

What version of Ruby and Bundler are you using?

@MarksSkeleton

This comment has been minimized.

MarksSkeleton commented May 1, 2018

Hi. Same problem here. Did you solved it already ?

ruby v 2.1
bundler v 1.16.1

--full-index does not change a thing.

bundle update tzinfo-data produceed this:

Bundler could not find compatible versions for gem "tzinfo":
  In snapshot (Gemfile.lock):
    tzinfo (= 0.3.41)

  In Gemfile:
    clockwork was resolved to 1.0.0, which depends on
      activesupport was resolved to 4.0.5, which depends on
        tzinfo (~> 0.3.37)

    tzinfo-data was resolved to 1.2018.4, which depends on
      tzinfo (>= 1.0.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Gemfile:

source 'http://rubygems.org'

gem 'rails', '4.0.5'
gem 'jquery-rails', '3.0.4'
gem 'rails_autolink'
gem 'mysql2'
gem 'devise'
gem 'twitter_oauth', git: 'git://github.com/moomerman/twitter_oauth.git'
gem 'therubyracer'
gem 'exception_notification'
gem 'nested_form'
gem 'dalli'
gem 'kgio'
gem 'will_paginate', '~> 3.0.pre2'
gem 'will_paginate-bootstrap'
gem 'nokogiri'
gem 'acts_as_tree'
gem 'acts_as_list'
gem 'gravatarify'
gem 'dynamic_form'
gem 'geokit'
gem 'redis'
gem 'resque-scheduler', '2.3.1', :require => 'resque_scheduler'
gem 'daemons'
#gem 'db2fog' (not compatible with Rails 4, see https://github.com/hakanensari/db2fog for Rails 4 version)
gem 'simplificator-rwebthumb', :git => "git://github.com/simplificator/rwebthumb.git"
gem 'tweetstream'
gem 'capistrano', '~> 2.15.4'
gem 'rack-utf8_sanitizer'
gem 'newrelic_rpm'
gem 'actionpack-xml_parser'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'chronic'
gem 'non-stupid-digest-assets'
gem 'em-http-request'
gem 'tzinfo'
gem 'tzinfo-data'
gem 'turbolinks'
gem 'geokit-rails'
gem 'clockwork'

# to use debugger
# gem 'ruby-debug'

# assets
gem "sass-rails", "4.0.2"
gem 'coffee-rails', " ~> 4.0"
gem 'uglifier'

group :development do
  gem 'annotate', '~> 2.6.1'
  gem 'quiet_assets'
  gem 'puma'
  gem 'i18n-tasks', '~> 0.5.4'
end

group :test do
  gem 'sqlite3-ruby', '1.3.3', :require => 'sqlite3'
  gem 'rspec-rails', '~> 2.14.1'
  gem 'spork'
  gem 'factory_girl_rails'
  gem 'webrat'
  gem 'faker'
  gem 'json_spec'
  gem 'autotest'
  gem 'autotest-rails'
  gem 'ZenTest'
  gem 'database_cleaner', '~> 1.2.0'
end

I tried to use version 1.2018.4 by edit the Gemfile.

Bundler could not find compatible versions for gem "tzinfo":
  In snapshot (Gemfile.lock):
    tzinfo (= 0.3.41)

  In Gemfile:
    clockwork was resolved to 1.0.0, which depends on
      activesupport was resolved to 4.0.5, which depends on
        tzinfo (~> 0.3.37)

    tzinfo-data (= 1.2018.4) was resolved to 1.2018.4, which depends on
      tzinfo (>= 1.0.0)


Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
@philr

This comment has been minimized.

Member

philr commented May 1, 2018

@MarksSkeleton The cause of your issue is that you are attempting to use the tzinfo-data gem with tzinfo v0.3.x (see also #3).

The short answer is that you don't need tzinfo-data in your Gemfile.

Your Gemfile specifies rails =4.0.5. Rails 4.0 (via activesupport) has a dependency on tzinfo ~> 0.3.37 (i.e. >= 0.3.37 and < 1.0.0). However, tzinfo-data requires tzinfo >= 1.0.0, so you can't install tzinfo-data and rails 4.0.x together.

The 1.0.0 release of tzinfo marked a switch from including all the time zone data in the tzinfo release to separating the data into an independent (and optional) tzinfo-data gem. The 0.3.x releases of tzinfo contain all the necessary time zone data and cannot (do not) make use of tzinfo-data.

If you want to keep using Rails 4.0.5, then you'll need to remove the gem 'tzinfo-data' line from your Gemfile. I was able to run bundle install on your Gemfile after removing the tzinfo-data line and changing gem 'activeadmin', github: 'gregbell/active_admin' to gem 'activeadmin', '1.0.0.pre5'.

Alternatively, you can upgrade to Rails 4.1 or later. Rails 4.1 depends on tzinfo ~> 1.1 and will allow tzinfo-data to be used.

@philr philr added the question label May 1, 2018

@philr philr closed this May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment