Sinatra and Shotgun Gems

R

Ryan C.

Hi all,

I'm working of playing around with a Nettuts Sinatra tutorial:

http://net.tutsplus.com/tutorials/ruby/singing-with-sinatra/

and for whatever reason, I can't get the shotgun gen to load. My
terminal (Debian Linux) returns the following:


mint@mint ~/Test-Run $ shotgun basics.rb
No command 'shotgun' found, did you mean:
Command 'shogun' from package 'shogun-cmdline' (universe)
shotgun: command not found
mint@mint ~/Test-Run $

I have tried editing my gem paths, but that shouldn't be it since
sinatra works, right?

Any help would be appreciated.

Thanks,
Ryan
 
P

prasad

[Note: parts of this message were removed to make it a legal post.]

This worked for me on Ubuntu after "sudo gem install shotgun"
$ shotgun hello.rb
== Shotgun/WEBrick on http://127.0.0.1:9393/
[2011-04-01 09:51:16] INFO WEBrick 1.3.1
[2011-04-01 09:51:16] INFO ruby 1.9.2 (2010-08-18) [x86_64-linux]
[2011-04-01 09:51:16] INFO WEBrick::HTTPServer#start: pid=3310 port=9393
127.0.0.1 - - [01/Apr/2011 09:52:30] "GET / HTTP/1.1" 200 12 0.0030

Prasad
 
B

Brian Candler

Ryan C. wrote in post #990276:
I have tried editing my gem paths, but that shouldn't be it since
sinatra works, right?

How did you install sinatra? You might be using the native Debian
package rather than the gem:

$ apt-cache search sinatra
libsinatra-ruby - Ruby web-development dressed in a DSL (Ruby 1.8
package)
libsinatra-ruby-doc - Ruby web-development dressed in a DSL
(documentation)
libsinatra-ruby1.8 - Ruby web-development dressed in a DSL
libsinatra-ruby1.9.1 - Ruby web-development dressed in a DSL

in which case the gems dir may not in fact be on your search path.

I suggest you try the following:

export PATH=/var/lib/gems/1.8/bin:$PATH
shotgun ...blah blah...
 
R

Ryan C.

Brian,

That was the fix I was looking for! Thank you.

One more question: Will I need to enter this path command every time I
rebook Linux? I've read a little on having a .bashrc file, but haven't
attempted to create anything.. I might need a little help if the case
is that I will need one.

Thanks,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top