X-Spam-Check-By: sourceware.org Date: Fri, 11 Aug 2006 11:19:34 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Dave Korn cc: cygwin AT cygwin DOT com Subject: RE: ruby irb doesn't seem to work In-Reply-To: <00f801c6bd57$864b8b20$a501a8c0@CAM.ARTIMI.COM> Message-ID: References: <00f801c6bd57$864b8b20$a501a8c0 AT CAM DOT ARTIMI DOT COM> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, 11 Aug 2006, Dave Korn wrote: > On 11 August 2006 15:31, Will Parsons wrote: > > > Dave Korn wrote: > >> On 11 August 2006 14:37, Will Parsons wrote: > >> > >>> Starting up irb (interactive Ruby), I get: > >>> > >>> $ irb > >>> /usr/bin/ruby: no such file to load -- ubygems (LoadError) > >>> > >>> Did I omit to install something I need here? > >> > >> Looks lke you omitted to install the leading letter 'R'. > >> > >> > > > > Now what package is that in? ;-) Why, the "r" package, of course. However, it doesn't seem to be on most mirrors, so those mirrors are probably broken... Don't use them. :-) > > Seriously, I think I've found the problem - I had an environment > > variable > > > > RUBYOPT=-rubygems > > > > Unsetting the variable seems to fix the problem. Apparently, I'd > > installed a non-Cygwin version of Ruby (which I didn't even remember > > doing), and this interferes with the Cygwin version. > > LOL, this happens so often and with so many languages it deserves an > acronym. > > TCOASSA! And that would stand for?.. > The missing R is still a clue though. > > ---------------------------------------------------< > dk AT rainbow /artimi/tools/linux> ruby --help > Usage: ruby [switches] [--] [programfile] [arguments] > [ ... snip ... ] > -rlibrary require the library, before executing your script > ---------------------------------------------------< > > So, I dunno if "RUBYOPT=-rrubygems" would work better. Not without > having rubygems installed, anyway, I don't suppose. Or perhaps it's one > of those awful puns like "-liberty". It is, actually, FWICS. > Hmm. It suggests here: > http://rubyforge.org/tracker/index.php?func=detail&aid=2497&group_id=126&atid=576 > that it's actually the cygwin package that sets the RUBYOPT variable, > even though it doesn't come with the rubygems library. If so, that > would be a packaging issue. OTOH, a quick scan through the package > listing for cygwin ruby doesn't show any postinstall script that could > have done that, so I'm not so sure if the report is accurate: I think > you've probably put your finger on it. FWIW, a postinstall script cannot set an environment variable -- it would have to be set in an /etc/profile.d script. But you're right -- ruby doesn't come with one (and I don't have RUBYOPT set, even though I have the latest Cygwin ruby installed). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/