Project

General

Profile

Bug #12138

Failure to run smart-proxy from another package that has it as a dependency

Added by Ewoud Kohl van Wijngaarden over 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Core
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

In the smart_proxy_dns_powerdns package I have a dependency on smart-proxy: https://github.com/theforeman/smart_proxy_dns_powerdns/blob/bd5f16c189fab2f4f3e03c7fb08ac8f893484ff9/Gemfile#L4-L6 . My goal is to run integration tests.

Now when I install dependencies using bundle install, I see it downloads it. Next I try to run the proxy. Since there's no binstub, I use bundle exec $(bundle show smart_proxy)/bin/smart-proxy. This shows the following error:

/home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/lib/smart_proxy.rb:33:in `<top (required)>': uninitialized constant Rack (NameError)
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/bin/smart-proxy:5:in `require'
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/bin/smart-proxy:5:in `<main>'

Adding require 'rack' then there's a similar error:

/home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/lib/sinatra-patch.rb:9:in `<module:Sinatra>': uninitialized constant Sinatra::Request (NameError)
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/lib/sinatra-patch.rb:1:in `<top (required)>'
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/lib/smart_proxy.rb:35:in `require'
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/lib/smart_proxy.rb:35:in `<top (required)>'
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/bin/smart-proxy:5:in `require'
    from /home/ekohl/.gem/ruby/bundler/gems/smart-proxy-5667c1ee6395/bin/smart-proxy:5:in `<main>'

Another thing that would make testing easier if the config directory was configurable, but for now I can dump the config in the directory.

Associated revisions

Revision c9f0a075 (diff)
Added by Ewoud Kohl van Wijngaarden over 4 years ago

Fixes #12138: Add require statements to run from bundler

Adding these allows smart_proxy to be run from bundler.

History

#1 Updated by Dmitri Dolguikh over 4 years ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/323 added
  • Pull request deleted ()

#2 Updated by Dmitri Dolguikh over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Ewoud Kohl van Wijngaarden

#3 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing

#4 Updated by Dominic Cleal over 4 years ago

  • Category set to Core
  • Legacy Backlogs Release (now unused) set to 71

#5 Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF