From: Collins Richey Date: 2008-03-10T01:03:22+09:00 Subject: Re: Slide Show v0.1 - A Free Web Alternative to PowerPoint and KeyNote in Ruby Now Live On Sat, Mar 8, 2008 at 10:19 PM, Gerald Bauer wrote: > Hello, > > > > ok, gen env points me to > > > > /usr/lib/ruby/gems/1.8/gems/slideshow-0.2/bin/slideshow > > > > Slideshow has a normal Linux shebang setup, ie > > > > #!/usr/bin/env ruby > > require 'rubygems' > > require 'slideshow' > > Slideshow.main > > > > If I mark the file executable and run it from the directory containing > > the sample, it doesn't work. > > > > Something about the gem setup must be wrong. > > You're looking at the Ruby script not the shell script/exectuable > generated by RubyGems. The shell script/exectuable generated by > RubyGems looks something like: > > #!c:/prg/ruby/v186/bin/ruby.exe > # > # This file was generated by RubyGems. > # > # The application 'slideshow' is installed as part of a gem, and > # this file is here to facilitate running it. > # > > require 'rubygems' > > version = ">= 0" > > if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then > version = $1 > ARGV.shift > end > > gem 'slideshow', version > load 'slideshow' > > > As mention before the shell script should get placed into your Ruby > interpreter's binary folder (not the gem folder) and you have to > include the Ruby interpreter's binary folder into your execution path > to make it work. > > > Note, your examples are for Windows, and not directly relavent for Linux. 1. The standard executable path on (most) Linux systems is '/usr/bin', and this is where ruby and irb reside. 2. 'gem query --local' shows the following *** LOCAL GEMS *** RedCloth (3.0.4) slideshow (0.2) 3. As expected, /usr/bin/redcloth exists, and it looks like the sample you quoted. 4. There is no /usr/bin/slideshow Either your gem is defective or gem itself is defective. I'll try building the executable manually and see if it works. -- Collins Richey If you fill your heart with regrets of yesterday and the worries of tomorrow, you have no today to be thankful for.