From: Matthew Kerwin Date: 2013-04-06T10:44:53+09:00 Subject: Re: How do you know what the main file in Ruby Projects is? --bcaec554e1066d9be504d9a75968 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 6 April 2013 09:44, Bartosz Dziewo=C5=84ski wrote: > On Sat, 06 Apr 2013 01:16:15 +0200, Matthew Kerwin > wrote: > > Question: why does a gem have a shebang line at all? Aren't gems always >> only ever required by other ruby scripts? >> > > Some gems include executable scripts. Examples would be Ocra or > ruby_parser. > > You can use `gem install --env-shebang ` to fix this for yoursel= f. > > Interesting. How do they get added to the shell path, so you can execute them? Or do you have to write /usr/local/lib/ruby/gems/1.9.3/gems/foo/lib/foo-cli.rb or whatever to actually run them? --=20 Matthew Kerwin, B.Sc (CompSci) (Hons) http://matthew.kerwin.net.au/ --bcaec554e1066d9be504d9a75968 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 6= April 2013 09:44, Bartosz Dziewo=C5=84ski <matma.rex@gmail.com><= /span> wrote:
On Sat, 06 Apr 2013 01:16:= 15 +0200, Matthew Kerwin <matthew@kerwin.net.au> wrote:

Question: why does a gem have a shebang line at all? Aren't gems always= only ever required by other ruby scripts?

Some gems include executable scripts. Examples would be Ocra or ruby_parser= .

You can use `gem install --env-shebang <gemname>` to fix this for you= rself.


I= nteresting.=C2=A0 How do they get added to the shell path, so you can execu= te them?=C2=A0 Or do you have to write /usr/local/lib/ruby/gems/1.9.3/gems/= foo/lib/foo-cli.rb or whatever to actually run them?

--
=C2=A0 Matthew= Kerwin, B.Sc (CompSci) (Hons)
=C2=A0 http://matthew.kerwin.net.au/
--bcaec554e1066d9be504d9a75968--