From: Gerald Bauer Date: 2008-03-09T13:19:13+09:00 Subject: Re: Slide Show v0.1 - A Free Web Alternative to PowerPoint and KeyNote in Ruby Now Live 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. Cheers. -- Gerald Bauer - Internet Professional - http://geraldbauer.wordpress.com