Running Shotgun Gem
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
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Nick Quaranto on 29 Jul, 2011 03:34 PM
I would report this to shotgun's issue tracker as well: https://github.com/rtomayko/shotgun
This could be a setup error though. How did you install RubyGems? With RVM?
3 Posted by MG on 29 Jul, 2011 03:52 PM
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"
Support Staff 4 Posted by Nick Quaranto on 29 Jul, 2011 03:56 PM
The
PATHadvice seems sound, but I would really recommend using RVM.http://rvm.beginrescueend.com/
Support Staff 5 Posted by Luis Lavena on 29 Jul, 2011 03:58 PM
Please do:
gem list -d shotgunAnd 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-p352then/Users/luis/.rvm/gems/ruby-1.8.7-p352/binshould be in$PATHCheck with:
echo $PATHAnd if is not, it should be added.
Mixing Ruby installation via apt-get with other installation of RubyGems (using
gem update --systemis a complicated scenario)On Debian/Ubuntu,
gem update --systemis 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.
6 Posted by Mago / MG on 29 Jul, 2011 04:07 PM
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!
7 Posted by MG on 30 Jul, 2011 10:43 PM
Hey Guys! So I am trying to install RVM, do I just type the following like I see it?
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Thanks for your help!
Support Staff 8 Posted by Luis Lavena on 04 Aug, 2011 05:30 PM
If you need help with RVM, please use IRC to reach other RVM users that might assist you better than us:
https://rvm.beginrescueend.com/support/irc/
Luis Lavena closed this discussion on 04 Aug, 2011 05:30 PM.