apiary-client
apiary-client copied to clipboard
Error with --server
I am trying to run apiary preview --watch --server
but it throws following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rack/server (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.6.0/gems/apiaryio-0.17.0/lib/apiary/command/preview.rb:89:in `server'
from /Library/Ruby/Gems/2.6.0/gems/apiaryio-0.17.0/lib/apiary/command/preview.rb:54:in `execute'
from /Library/Ruby/Gems/2.6.0/gems/apiaryio-0.17.0/lib/apiary/cli.rb:45:in `preview'
from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
from /Library/Ruby/Gems/2.6.0/gems/apiaryio-0.17.0/bin/apiary:5:in `<top (required)>'
from /usr/local/bin/apiary:23:in `load'
from /usr/local/bin/apiary:23:in `<main>'
Same issue
I had this issue as well, it looks like https://github.com/rack/rack moved rack/server
into a separate gem for v3. To workaround that I manually uninstalled rack 3.0.0
and installed 2.2.4
with gem
.
My uneducated guess would be apiary should be ensuring the rack dependency is < v3 or adding the separate gem as a dependency.
I added PR #215 with locked dependency. Not sure if any maintainer is available after I left the company year ago.