Installation / usage guide no longer works
Closed this issue · 4 comments
Describe the bug
- Create a new directory
- $
bundle init
- Add
gem "uploadcare-ruby"
toGemfile
- $
bundle install
- 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
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.
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.
@jackc The issue was fixed in the latest version (4.3)
No need to lock dry-configurable
anymore
Thanks!