Start a new topic

Unable to Access Ruby Developer API - require('ost-sdk-ruby') fails

On Ubuntu 16.04 LTS


ubuntu@neo-gcp-01-ubuntu16:~/OST$ sudo gem install ost-sdk-ruby # installs the gem

Successfully installed ost-sdk-ruby-0.9.2

Parsing documentation for ost-sdk-ruby-0.9.2

Done installing documentation for ost-sdk-ruby after 0 seconds

1 gem installed



ubuntu@myserver:~/OST$ sudo irb

irb(main):001:0> require('ost-sdk-ruby')

LoadError: cannot load such file -- rack

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util/http_helper.rb:12:in `<class:HTTPHelper>'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util/http_helper.rb:5:in `<module:Util>'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util/http_helper.rb:3:in `<module:OSTSdk>'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util/http_helper.rb:1:in `<top (required)>'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util.rb:4:in `require_relative'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby/util.rb:4:in `<top (required)>'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

        from /var/lib/gems/2.3.0/gems/ost-sdk-ruby-0.9.2/lib/ost-sdk-ruby.rb:7:in `<top (required)>'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'

        from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'

        from (irb):1

        from /usr/bin/irb:11:in `<main>'

1 Comment

This issue was resolved by @Jason . There was a missing step in the documentation to install rack.


The solution is to issue the following command

sudo gem install rack


PS:  to use the gem ‘rack’ - ruby version 2.2.x is required

https://github.com/OpenSTFoundation/ost-sdk-ruby/issues/5


This issue may be considered as closed, if the Developer Docs is updated with the above statement for pre-requisite

Login to post a comment