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

Installation / usage guide no longer works #111

Closed
jackc opened this issue Oct 10, 2022 · 4 comments
Closed

Installation / usage guide no longer works #111

jackc opened this issue Oct 10, 2022 · 4 comments
Labels

Comments

@jackc
Copy link

jackc commented Oct 10, 2022

Describe the bug

  1. Create a new directory
  2. $ bundle init
  3. Add gem "uploadcare-ruby" to Gemfile
  4. $ bundle install
  5. Try to require uploadcare

Expected behavior

It doesn't crash.

Code / screenshots

Gemfile:

source "https://rubygems.org"

gem "uploadcare-ruby"

main.rb:

require 'uploadcare'

Output from bundle exec ruby main.rb:

/Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.16.0/lib/dry/configurable/dsl.rb:31:in `setting': wrong number of arguments (given 2, expected 1) (ArgumentError)
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.16.0/lib/dry/configurable/class_methods.rb:44:in `setting'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/api_struct-1.0.5/lib/api_struct/settings.rb:5:in `<class:Settings>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/api_struct-1.0.5/lib/api_struct/settings.rb:2:in `<module:ApiStruct>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/api_struct-1.0.5/lib/api_struct/settings.rb:1:in `<top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/api_struct-1.0.5/lib/api_struct.rb:9:in `require_relative'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/api_struct-1.0.5/lib/api_struct.rb:9:in `<top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/client/rest_client.rb:4:in `require'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/client/rest_client.rb:4:in `<top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/client/conversion/base_conversion_client.rb:3:in `require_relative'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/client/conversion/base_conversion_client.rb:3:in `<top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/entity/entity.rb:3:in `require'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/entity/entity.rb:3:in `block in <top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/entity/entity.rb:3:in `each'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare/entity/entity.rb:3:in `<top (required)>'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare.rb:11:in `require'
	from /Users/jack/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/uploadcare-ruby-3.3.2/lib/uploadcare.rb:11:in `<top (required)>'
	from main.rb:1:in `require'
	from main.rb:1:in `<main>'

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.1)
      public_suffix (>= 2.0.2, < 6.0)
    api_struct (1.0.5)
      dry-configurable
      dry-inflector
      dry-monads (~> 1)
      hashie
      http
    concurrent-ruby (1.1.10)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    dry-configurable (0.16.0)
      dry-core (~> 0.6)
      zeitwerk (~> 2.6)
    dry-core (0.8.1)
      concurrent-ruby (~> 1.0)
    dry-inflector (0.3.0)
    dry-monads (1.4.0)
      concurrent-ruby (~> 1.0)
      dry-core (~> 0.7)
    ffi (1.15.5)
    ffi-compiler (1.0.1)
      ffi (>= 1.0.0)
      rake
    hashie (5.0.0)
    http (5.1.0)
      addressable (~> 2.8)
      http-cookie (~> 1.0)
      http-form_data (~> 2.2)
      llhttp-ffi (~> 0.4.0)
    http-cookie (1.0.5)
      domain_name (~> 0.5)
    http-form_data (2.3.0)
    llhttp-ffi (0.4.0)
      ffi-compiler (~> 1.0)
      rake (~> 13.0)
    parallel (1.22.1)
    public_suffix (5.0.0)
    rake (13.0.6)
    retries (0.0.5)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8.2)
    uploadcare-ruby (3.3.2)
      api_struct (~> 1.0.1)
      dry-configurable (~> 0.9)
      parallel
      retries
    zeitwerk (2.6.1)

PLATFORMS
  x86_64-darwin-21

DEPENDENCIES
  uploadcare-ruby

BUNDLED WITH
   2.3.22
@jackc jackc added the bug label Oct 10, 2022
@rsedykh
Copy link
Member

rsedykh commented Jan 23, 2023

Hi @jackc. Sorry for the very late response, but have you tried https://github.com/uploadcare/uploadcare-ruby/releases/tag/v4.0.0-rc, does it work for you? It's not yet finished (we have to deal with uploadcare/uploadcare-rails#110), so it's not yet on RubyGems, but as I understand it should work for you.

@jackc
Copy link
Author

jackc commented Jan 24, 2023

I haven't tried that. Memory is a bit fuzzy at this point. I think I actually ran into this when trying to upgrade a production app. When that failed I tried the installation guide on a fresh project to try to reproduce the problem -- that resulted in this post.

I think my attempt predated the instructions to lock the version of dry-configurable. That allowed me to move forward on production.

@kraft001
Copy link
Collaborator

@jackc The issue was fixed in the latest version (4.3)
No need to lock dry-configurable anymore

@jackc
Copy link
Author

jackc commented Mar 16, 2023

Thanks!

@jackc jackc closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants