Running Shotgun Gem

Mago's Avatar


25 Jul, 2011 11:38 PM

I installed the Shotgun (0.9) gem, but when I try to run my file using Shotgun, it gives me an error message.

$ shotgun file.rb No command 'shotgun' found, did you mean:
Blah Blah Blah...

shotgun: command not found

  1. Support Staff 1 Posted by Nick Quaranto on 29 Jul, 2011 03:34 PM

    Nick Quaranto's Avatar

    I would report this to shotgun's issue tracker as well:

    This could be a setup error though. How did you install RubyGems? With RVM?

  2. 2 Posted by MG on 29 Jul, 2011 03:52 PM

    MG's Avatar

    Hi Nick, thanks for the reply. That's what I thought at first, so I uninstalled and re-installed through the terminal: sudo apt-get install gem (on ubuntu)

    When I run gem list:
    I see all of my libraries, but other than Sinatra, nothing else works.

    I posted this on LinkedIn, and someone advised the following:

    "It seems you have to add the shotgun bin to the executable search path. Something like: export PATH=/path/to/your/gems/bin:$PATH Try it in the command line and then do the same in ~/bashrc"

  3. Support Staff 3 Posted by Nick Quaranto on 29 Jul, 2011 03:56 PM

    Nick Quaranto's Avatar

    The PATH advice seems sound, but I would really recommend using RVM.

  4. 4 Posted by Luis Lavena on 29 Jul, 2011 03:58 PM

    Luis Lavena's Avatar

    Please do:

    gem list -d shotgun

    And will display where shotgun was installed.

    Now, check if the closes directory to that installation location is in the PATH

    E.g.: if shotgun was installed in /Users/luis/.rvm/gems/ruby-1.8.7-p352 then /Users/luis/.rvm/gems/ruby-1.8.7-p352/bin should be in $PATH

    Check with: echo $PATH

    And if is not, it should be added.

    Mixing Ruby installation via apt-get with other installation of RubyGems (using gem update --system is a complicated scenario)

    On Debian/Ubuntu, gem update --system is disabled and should not be used.

    Manual installed RubyGems on Debian/Ubuntu do not install gems in places in the PATH.

    Let us know if that helps or not.

  5. 5 Posted by Mago / MG on 29 Jul, 2011 04:07 PM

    Mago / MG's Avatar

    I'll give it a try over the weekend. If it wasn't obvious enough already, I am a Ruby / Ruby Gem / RoR Noobster! But I am excited about learning it...Thanks Guys!

  6. 6 Posted by MG on 30 Jul, 2011 10:43 PM

    MG's Avatar

    Hey Guys! So I am trying to install RVM, do I just type the following like I see it?

    bash < <(curl -s

    Thanks for your help!

  7. 7 Posted by Luis Lavena on 04 Aug, 2011 05:30 PM

    Luis Lavena's Avatar

    If you need help with RVM, please use IRC to reach other RVM users that might assist you better than us:

  8. Luis Lavena closed this discussion on 04 Aug, 2011 05:30 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac