ntxcode / sinatra-swagger-ui

An Sinatra application serving a Swagger UI
MIT License
4 stars 4 forks source link

LoadError: cannot load such file -- sinatra_swagger_ui #2

Closed mozgbrasil closed 4 years ago

mozgbrasil commented 4 years ago

Good afternoon my friends

If you can help

See what I show in the image

That when executing the command

$ bundle install

informed that the library has been installed

But when executing the command

$ rake --tasks

is reporting an error when trying to load the library

-

Following information about my environment

$     which ruby
/usr/bin/ruby
$     ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$     gem --version
3.1.2
$     gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.1.2
  - RUBY VERSION: 2.7.0 (2019-12-25 patchlevel 0) [x86_64-linux-gnu]
  - INSTALLATION DIRECTORY: /home/marcio/gems
  - USER INSTALLATION DIRECTORY: /home/marcio/.gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/bin/ruby2.7
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/marcio/gems/bin
  - SPEC CACHE DIRECTORY: /home/marcio/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/marcio/gems
     - /home/marcio/.gem/ruby/2.7.0
     - /var/lib/gems/2.7.0
     - /usr/lib/ruby/gems/2.7.0
     - /usr/share/rubygems-integration/2.7.0
     - /usr/share/rubygems-integration/all
     - /usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/marcio/.nvm/versions/node/v12.18.1/bin
     - /home/marcio/gems/bin
     - /home/linuxbrew/.linuxbrew/bin
     - /home/linuxbrew/.linuxbrew/sbin
     - /home/marcio/.local/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games
     - /snap/bin
     - /home/marcio/Android/Sdk/emulator
     - /home/marcio/Android/Sdk/tools
     - /home/marcio/Android/Sdk/tools/bin
     - /home/marcio/Android/Sdk/platform-tools
$     gem list

*** LOCAL GEMS ***

actionmailer (5.1.1)
actionpack (5.1.1)
actionview (5.1.1)
activejob (5.1.1)
activemodel (5.1.1)
activerecord (5.1.1)
activesupport (5.2.3, 5.1.1)
addressable (2.7.0, 2.6.0, 2.5.1)
api-pagination (4.8.2, 4.6.3)
arel (8.0.0)
ast (2.4.1, 2.4.0)
aws-eventstream (1.1.0)
aws-sdk (2.11.550, 2.11.549, 2.10.32)
aws-sdk-core (2.11.550, 2.11.549, 2.10.32)
aws-sdk-resources (2.11.550, 2.11.549, 2.10.32)
aws-sigv4 (1.2.1, 1.0.1)
axiom-types (0.1.1)
bcrypt (3.1.15, 3.1.11)
benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
builder (3.2.4, 3.2.3)
bundler (2.1.4, default: 2.1.2, 1.17.2)
cgi (default: 0.1.0)
coderay (1.1.3, 1.1.1)
coercible (1.0.0)
colorator (1.1.0)
concurrent-ruby (1.1.6, 1.1.5, 1.0.5)
connection_pool (2.2.3, 2.2.1)
crack (0.4.3)
crass (1.0.6)
csv (default: 3.1.2)
database_cleaner (1.8.5, 1.6.1)
date (default: 3.0.0)
dbm (default: 1.1.0)
debase (0.2.5.beta1, 0.2.4.1, 0.2.2)
debase-ruby_core_source (0.10.9, 0.10.2)
delegate (default: 0.1.0)
descendants_tracker (0.0.4)
did_you_mean (default: 1.4.0)
diff-lcs (1.4.4, 1.3)
dotenv (2.7.6, 2.2.1)
dotenv-rails (2.7.6, 2.2.1)
e2mmap (0.1.0)
em-websocket (0.5.1)
equalizer (0.0.11)
erubi (1.9.0, 1.6.0)
et-orbi (1.2.4, 1.0.8)
etc (default: 1.1.0)
eventmachine (1.2.7)
factory_girl (4.9.0, 4.8.0)
faraday (1.0.1, 0.15.4, 0.12.1)
fcntl (default: 1.0.0)
fdoc (0.3.3)
ffaker (2.15.0, 2.5.0)
ffi (1.12.2, 1.11.1)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
foreman (0.87.1, 0.84.0)
forwardable (default: 1.3.1)
forwardable-extended (2.6.0)
fugit (1.3.6)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
globalid (0.4.2, 0.4.0)
god (0.13.7)
grape (0.19.2)
grape-entity (0.7.1)
grape-swagger (0.27.2)
grape-swagger-entity (0.2.5, 0.2.0)
grape_logging (1.8.3, 1.7.0)
hashdiff (1.0.1, 0.3.4)
hashie (4.1.0, 3.5.5)
html-pipeline (2.11.1)
http_parser.rb (0.6.0)
i18n (1.8.2, 0.9.5)
ice_nine (0.11.2)
io-console (default: 0.5.3)
ipaddr (default: 1.2.2)
irb (default: 1.2.1)
jekyll (4.0.1, 3.8.6)
jekyll-avatar (0.6.0)
jekyll-github-metadata (2.12.1)
jekyll-mentions (1.4.1)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.1.0, 1.5.2)
jekyll-seo-tag (2.6.1)
jekyll-watch (2.2.1)
jmespath (1.4.0, 1.3.1)
json (2.3.1, default: 2.3.0, 2.1.0)
json-schema (1.2.1)
jwt (2.2.1, 1.5.6)
kaminari (1.2.1, 1.0.1)
kaminari-actionview (1.2.1, 1.0.1)
kaminari-activerecord (1.2.1, 1.0.1)
kaminari-core (1.2.1, 1.0.1)
kramdown (2.3.0, 2.2.1, 1.17.0, 1.13.2)
kramdown-parser-gfm (1.1.0)
liquid (4.0.3)
listen (3.2.1, 3.1.5)
logger (default: 1.4.2)
loofah (2.6.0, 2.0.3)
mail (2.7.1, 2.6.5)
matrix (default: 0.2.0)
mercenary (0.3.6)
method_source (1.0.0, 0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_mime (1.0.2)
mini_portile2 (2.4.0, 2.1.0)
minitest (5.14.1, 5.13.0, 5.11.3)
multi_json (1.15.0, 1.13.1)
multi_xml (0.6.0)
multipart-post (2.1.1, 2.0.0)
mustermann (1.1.1, 1.0.0)
mustermann-grape (1.0.1, 1.0.0)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
net-telnet (0.1.1)
nio4r (2.5.2)
nokogiri (1.10.10, 1.10.3, 1.7.2)
observer (default: 0.1.0)
octokit (4.14.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
parallel (1.19.2, 1.12.1)
parser (2.7.1.4, 2.4.0.2)
pathutil (0.16.2)
pg (1.2.3, 0.21.0)
power_assert (1.1.7)
powerpack (0.1.1)
prime (default: 0.1.1)
pry (0.13.1, 0.10.4)
pry-remote (0.1.8)
pstore (default: 0.1.0)
psych (default: 3.1.0)
public_suffix (4.0.5, 3.1.1, 2.0.5)
puma (4.3.5, 3.8.2)
pundit (2.1.0, 1.1.0)
raabro (1.3.1)
racc (default: 1.4.16)
rack (2.2.3, 2.0.3)
rack-accept (0.4.5)
rack-attack (6.3.1, 5.0.1)
rack-cors (1.1.1, 0.4.1)
rack-protection (2.0.8.1, 2.0.0)
rack-test (0.6.3)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.3.0, 1.0.3)
railties (5.1.1)
rainbow (3.0.0)
rake (13.0.1, 12.3.0)
rb-fsevent (0.10.4, 0.10.3)
rb-inotify (0.10.1, 0.10.0)
rdoc (default: 6.2.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
redis (4.2.1, 3.3.3)
regexp_parser (1.7.1)
reline (default: 0.1.2)
rexml (3.2.4, default: 3.2.3)
rouge (3.19.0, 3.7.0)
rspec (3.6.0)
rspec-core (3.6.0)
rspec-expectations (3.6.0)
rspec-mocks (3.6.0)
rspec-support (3.6.0)
rss (default: 0.2.8)
rubocop (0.88.0, 0.52.1)
rubocop-ast (0.2.0)
ruby-debug-ide (0.6.0)
ruby-progressbar (1.10.1, 1.9.0)
ruby2_keywords (0.0.2)
ruby_dep (1.5.0)
rufus-scheduler (3.6.0, 3.4.2)
safe_yaml (1.0.5, 1.0.4)
sass (3.7.4)
sass-listen (4.0.0)
sassc (2.3.0)
sawyer (0.8.2)
sdbm (default: 1.0.0)
sentry-raven (3.0.0, 2.4.0)
shoulda-matchers (4.3.0, 3.1.1)
sidekiq (6.1.1, 5.0.0)
sidekiq-scheduler (3.0.1, 2.1.10)
sinatra (2.0.8.1, 2.0.0)
singleton (default: 0.1.0)
slop (3.6.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
stub_env (1.0.4)
terminal-table (1.8.0)
test-unit (3.3.5)
thor (1.0.1, 0.19.4)
thread_safe (0.3.6)
thwait (0.2.0)
tilt (2.0.10, 2.0.7)
timecop (0.9.1, 0.9.0)
timeout (default: 0.1.0)
tracer (default: 0.1.0)
tzinfo (1.2.7, 1.2.5)
unicode-display_width (1.7.0, 1.3.0)
upsert (2.9.10, 2.2.1)
uri (default: 0.10.0)
virtus (1.0.5)
webmock (3.8.3, 3.0.1)
webrick (default: 1.6.0)
xmlrpc (0.3.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)
lynxnathan commented 4 years ago

Hi @mozgbrasil, thanks for opening the issue!

Unfortunately this project is no longer maintained. I didn't personally test them but you might have a better time trying one of those projects instead:

The oficial docs have plenty of other ways to add it to your project: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/installation.md#installation

Including this one-liner which you can add to whatever HTML doc you are serving from your sinatra app:

<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
<!-- `SwaggerUIBundle` is now available on the page -->

I'll mark our projects with a unmaintained notice whenever I can so nobody else ends up like you did! Sorry about that!