What do you think about adding a shebang line to the samples so they can be launched on linux/mac like you can on windows? Roy
I usually add #!/usr/bin/env ruby to my own programs. I am fine with it as long as it does not cause any problems on Windows. +1 for me Should we start moving discussions like this to the new wxruby-development list? Sean On 10/5/06, Roy Sutton <roys at mindspring.com> wrote:> What do you think about adding a shebang line to the samples so they can > be launched on linux/mac like you can on windows? > > Roy > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >
Sean Long wrote:> On 10/5/06, Roy Sutton <roys at mindspring.com> wrote: >> What do you think about adding a shebang line to the samples so they can >> be launched on linux/mac like you can on windows?> I usually add > #!/usr/bin/env ruby > > to my own programs.+1 from me, using the shebang line above.> Should we start moving discussions like this to the new wxruby-development list?Yes, since it now appears that all the core developers are subscribed. Except that I haven''t yet received a message I posted to it several minutes ago :-( Kevin
I think I brought this up before. I think it''s time to revisit this idea in the samples: begin require ''wx'' rescue LoadError require ''rubygems'' require ''wx'' end Or even skip the first step and change all samples to: require ''rubygems'' require ''wx'' Since we''re distributing as a binary gem now, it seems that''s a reasonable way to go. Roy Kevin Smith wrote:> Sean Long wrote: > >> On 10/5/06, Roy Sutton <roys at mindspring.com> wrote: >> >>> What do you think about adding a shebang line to the samples so they can >>> be launched on linux/mac like you can on windows? >>> > > >> I usually add >> #!/usr/bin/env ruby >> >> to my own programs. >> > > +1 from me, using the shebang line above. > > >> Should we start moving discussions like this to the new wxruby-development list? >> > > Yes, since it now appears that all the core developers are subscribed. > Except that I haven''t yet received a message I posted to it several > minutes ago :-( > > Kevin > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > >
Roy Sutton wrote:> I think I brought this up before. I think it''s time to revisit this > idea in the samples: > > begin > require ''wx'' > rescue LoadError > require ''rubygems'' > require ''wx'' > endI forget how I felt about it before, but I think I agree now. Until rubygems are part of standard Ruby, if we don''t do this we will get a lot of questions, and have a lot of frustrated first-time users. Including some who won''t even bother asking.> Or even skip the first step and change all samples to: > > require ''rubygems'' > require ''wx'' > > Since we''re distributing as a binary gem now, it seems that''s a > reasonable way to go.That was my proposal earlier, but someone felt it was unreasonable to require a gem, since we do also distribute source. So I vote for your first proposal. Kevin
Kevin Smith wrote:> Roy Sutton wrote: > >> I think I brought this up before. I think it''s time to revisit this >> idea in the samples: >> >> begin >> require ''wx'' >> rescue LoadError >> require ''rubygems'' >> require ''wx'' >> end >>Overall I''m ''0'' on this - my developer head says ''people ought to sort out their own installations, and rubygems ought to work better''; my public relations head says ''just make it work''. Think we should probably go with the latter. But strongly prefer the first style (don''t require rubygems), and would suggest tweaking your code so the right error is raised if neither lib nor gem is found: begin require ''wx'' rescue LoadError => no_wx_err begin require ''rubygems'' and retry rescue LoadError raise no_wx_err end end thanks alex PS - would be very grateful if someone could try out my patches from last week and apply if appropriate.
+1 for begin require ''wx'' rescue LoadError require ''rubygems'' require ''wx'' end Sean On 10/10/06, Kevin Smith <wxruby at qualitycode.com> wrote:> Roy Sutton wrote: > > I think I brought this up before. I think it''s time to revisit this > > idea in the samples: > > > > begin > > require ''wx'' > > rescue LoadError > > require ''rubygems'' > > require ''wx'' > > end > > I forget how I felt about it before, but I think I agree now. Until > rubygems are part of standard Ruby, if we don''t do this we will get a > lot of questions, and have a lot of frustrated first-time users. > Including some who won''t even bother asking. > > > Or even skip the first step and change all samples to: > > > > require ''rubygems'' > > require ''wx'' > > > > Since we''re distributing as a binary gem now, it seems that''s a > > reasonable way to go. > > That was my proposal earlier, but someone felt it was unreasonable to > require a gem, since we do also distribute source. > > So I vote for your first proposal. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >
Alex Fenton wrote:> begin > require ''wx'' > rescue LoadError => no_wx_err > begin > require ''rubygems'' and retry > rescue LoadError > raise no_wx_err > end > end >Hmm, I''ll have to try that.> PS - would be very grateful if someone could try out my patches from > last week and apply if appropriate.Sorry, Alex. I''ve been so busy I have barely had time to respond to e-mail lately. I''ll get to those this week some time if no one else gets them. On the face of them they /looked/ fine but I haven''t tried compiling them. Roy
Alex Fenton wrote:> PS - would be very grateful if someone could try out my patches from > last week and apply if appropriate.Like Roy, I have been completely swamped recently. I''ll try to squeeze some time in this week for wxruby, but realistically the earliest I will be able to look at those patches is probably Saturday. Kevin