shotgun icon indicating copy to clipboard operation
shotgun copied to clipboard

Running a basic sinatra file shotgun breaks and cannot find 'rack/commonlogger'

Open snood1205 opened this issue 10 years ago • 4 comments

I am attempting to use shotgun to run a file basic.rb which has the contents

require 'sinatra'

get '/' do
  'Test'
end

When I run sinatra basic.rb everything works fine and shotgun -v returns Rack 1.3. How can I resolve this?

snood1205 avatar Aug 23 '16 17:08 snood1205

Also experiencing a similar issue on a Grape project. Here is some additional information that might be useful.

LoadError: cannot load such file -- rack/commonlogger
  /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/shotgun-0.9.1/bin/shotgun:112:in `require'
  /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/shotgun-0.9.1/bin/shotgun:112:in `<top (required)>'
  /usr/local/var/rbenv/versions/2.3.1/bin/shotgun:23:in `load'
  /usr/local/var/rbenv/versions/2.3.1/bin/shotgun:23:in `<top (required)>'

I believe this could be related to an old commit in rack where the file was renamed from commonlogger to common_logger? https://github.com/rack/rack/commit/857641dab255dbec490fead1d3a0f1ff999b2137

danieldraper avatar Sep 05 '16 02:09 danieldraper

Similar problem for me too...

/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in require': cannot load such file -- rack/commonlogger (LoadError) from ...../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in rescue in require' from ..../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in require' from ..../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/shotgun-0.9.1/bin/shotgun:112:in <top (required)>' from ..../.rbenv/versions/2.2.2/bin/shotgun:23:in load' from ..../.rbenv/versions/2.2.2/bin/shotgun:23:in <main>'

ostigley avatar Sep 05 '16 04:09 ostigley

/Users/coreycondardo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require': cannot load such file -- rack/commonlogger (LoadError)
        from /Users/coreycondardo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from /Users/coreycondardo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /Users/coreycondardo/.rvm/gems/ruby-2.3.0@dev-support-metrics/gems/shotgun-0.9.1/bin/shotgun:112:in `<top (required)>'
        from /Users/coreycondardo/.rvm/gems/ruby-2.3.0@dev-support-metrics/bin/shotgun:23:in `load'
        from /Users/coreycondardo/.rvm/gems/ruby-2.3.0@dev-support-metrics/bin/shotgun:23:in `<main>'
        from /Users/coreycondardo/.rvm/gems/ruby-2.3.0@dev-support-metrics/bin/ruby_executable_hooks:15:in `eval'
        from /Users/coreycondardo/.rvm/gems/ruby-2.3.0@dev-support-metrics/bin/ruby_executable_hooks:15:in `<main>'

coreycondardo avatar Sep 10 '16 01:09 coreycondardo

Please upgrade to Shotgun 0.9.2. Thank you.

djanowski avatar Sep 10 '16 23:09 djanowski