Skip to content
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

image_optim_pack-0.5.0.20171208: uninitialized constant ImageOptim::BinResolver::Bin::Date #14

Closed
HansVanEijsden opened this issue Dec 13, 2017 · 3 comments

Comments

@HansVanEijsden
Copy link

HansVanEijsden commented Dec 13, 2017

After updating to image_optim_pack-0.5.0.20171208 I receive an error while running image_optim:

$ image_optim --info
image_optim v0.26.0
config:
  verbose: true
nice: 10
threads: 8
pack: true
skip_missing_workers: true
allow_lossy: false
cache_dir: 
cache_worker_digests: false
image_optim_pack: all bins from /Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim_pack-0.5.0.20171208-x86_64-darwin/vendor/darwin-x86_64 worked
Resolved pngcrush 1.8.13 at /Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim_pack-0.5.0.20171208-x86_64-darwin/vendor/darwin-x86_64/pngcrush
uninitialized constant ImageOptim::BinResolver::Bin::Date
Did you mean?  Data
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver/bin.rb:97:in `version_string'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver/bin.rb:77:in `detect_version'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver/bin.rb:20:in `initialize'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:36:in `new'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:36:in `block in resolve!'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:101:in `block in resolving'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:100:in `synchronize'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:100:in `resolving'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:34:in `resolve!'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim.rb:217:in `resolve_bin!'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/worker.rb:68:in `block in resolve_used_bins!'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:72:in `block in collect_errors'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:70:in `each'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:70:in `collect_errors'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/worker.rb:67:in `resolve_used_bins!'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/worker/class_methods.rb:63:in `block in create_all'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:72:in `block in collect_errors'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:70:in `each'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/bin_resolver.rb:70:in `collect_errors'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/worker/class_methods.rb:62:in `create_all'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/worker/class_methods.rb:44:in `create_all_by_format'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim.rb:86:in `initialize'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/runner.rb:54:in `new'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/lib/image_optim/runner.rb:54:in `initialize'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/bin/image_optim:17:in `new'
/Users/hans/.rvm/gems/ruby-2.3.1/gems/image_optim-0.26.0/bin/image_optim:17:in `<top (required)>'
/Users/hans/.rvm/gems/ruby-2.3.1/bin/image_optim:23:in `load'
/Users/hans/.rvm/gems/ruby-2.3.1/bin/image_optim:23:in `<main>'

When I specify --no-pngout then everything works again.

I updated through this command, with this output:

$ gem update
Updating installed gems
Updating exifr
Fetching: exifr-1.3.3.gem (100%)
Successfully installed exifr-1.3.3
Updating image_optim_pack
Fetching: image_optim_pack-0.5.0.20171208-x86_64-darwin.gem (100%)
Successfully installed image_optim_pack-0.5.0.20171208-x86_64-darwin
Updating psych
Fetching: psych-3.0.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed psych-3.0.1
Updating rdoc
Fetching: rdoc-6.0.0.gem (100%)
Successfully installed rdoc-6.0.0
Updating test-unit
Fetching: test-unit-3.2.7.gem (100%)
Successfully installed test-unit-3.2.7
Gems updated: exifr image_optim_pack psych rdoc test-unit
Darwin iMac-van-Hans-van-Eijsden.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

I also have this exact problem on Debian 9:

$ uname -a
Linux web319 4.13.0-0.bpo.1-amd64 #1 SMP Debian 4.13.13-1~bpo9+1 (2017-11-22) x86_64 GNU/Linux

Let me know if you need more info! Thanks.

@toy
Copy link
Owner

toy commented Dec 13, 2017

The root problem is not in image_optim_pack, but in image_optim gem – there is no require 'date' in it, so you must have updated something else that was requiring date and the problem surfaced.

@toy
Copy link
Owner

toy commented Dec 14, 2017

Updating to image_optim v0.26.1 should resolve the problem

@HansVanEijsden
Copy link
Author

Thank you very much!

m0n9oose pushed a commit to SpaceSquirrelApps/image_optim that referenced this issue Jan 16, 2018
…master

* 'master' of https://github.com/toy/image_optim: (125 commits)
  travis: update pngout
  rubocop 0.52.1
  travis: add ruby 2.5.0
  fix codeclimate coverage badge
  travis: explicitly install bundler if it can’t run
  Show full bin search path in verbose output
  travis: update rubies
  fix codeclimate badge
  v0.26.1
  require date which is used in parsing pngout version, fixes toy/image_optim_pack#14
  rubocop 0.52
  v0.26.0
  fix jpegrescan for windows
  output redirect in worker on a separate line
  add jpegrescan.bat for jpegrescan to work on windows
  enable jpegrescan by default
  jpegrescan: remove File::Slurp dependency
  jpegrescan: use perl from path, replacement for -ws (shebang may allow only one argument)
  remove /vendor/ from .gitignore
  remove gratipay from readme
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants