0

I'm trying to startup my sinatra application using shotgun but am having a bit of trouble. My app would run locally when I last checked 3 weeks ago and is currently still working on Heroku however I'm currently unable to run the program locally. When I run "ruby index.rb" I receive the following error:

/Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `require': unable to find a version of 'actionpack' to activate (Gem::LoadError)
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/prediction.rb:1:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/stop.rb:2:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni/route.rb:4:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /Users/xxx/.rvm/gems/ruby-2.0.0-p451/gems/muni-0.0.8/lib/muni.rb:2:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from index.rb:3:in `<main>'

When I shotgun the application I receive:

`Boot Error

Something went wrong while loading config.ru

RuntimeError: missing run or map statement

I have never seen either of these issues before nor has googling or searching stack overflow been much help. Here is what my gemfile looks like:

gem 'dotenv-rails', :groups => [:development, :test]

source "http://rubygems.org"

gem "sinatra" 
gem "muni"
gem "shotgun"
gem "thin"
gem "actionpack"

and the corresponding gemfile.lock:

GEM
  remote: http://rubygems.org/
  specs:
    actionpack (4.1.1)
      actionview (= 4.1.1)
      activesupport (= 4.1.1)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionview (4.1.1)
      activesupport (= 4.1.1)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    activesupport (4.1.1)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    amatch (0.3.0)
      tins (~> 1.0)
    builder (3.2.2)
    daemons (1.1.9)
    dotenv (0.11.1)
      dotenv-deployment (~> 0.0.2)
    dotenv-deployment (0.0.2)
    dotenv-rails (0.11.1)
      dotenv (= 0.11.1)
    erubis (2.7.0)
    eventmachine (1.0.3)
    i18n (0.6.9)
    json (1.8.1)
    minitest (5.3.5)
    muni (0.0.8)
      actionpack
      amatch
      thor
      xml-simple
    rack (1.5.2)
    rack-protection (1.5.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    shotgun (0.9)
      rack (>= 1.0)
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    thin (1.6.2)
      daemons (>= 1.0.9)
      eventmachine (>= 1.0.0)
      rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
tins (1.3.0)
tzinfo (1.2.1)
  thread_safe (~> 0.1)
xml-simple (1.1.3)

PLATFORMS
  ruby

DEPENDENCIES
  actionpack
  dotenv-rails
  muni
  shotgun
  sinatra
  thin

Is this gem not currently working?

Thanks for all your help.

  • What does `bundle check` say? Does `bin/rails c` work? – tadman Jun 23 '14 at 18:16
  • So, I never specified after running shotgun; in order for the app to run locally I need to run "shotgun index.rb". Why do I need to specify which ruby file to "shotgun"? –  Jun 23 '14 at 23:48
  • `shotgun` might do the `require 'bundle/setup'` step that makes it work. – tadman Jun 23 '14 at 23:49

0 Answers0