# Terminal residue

**URL:** <https://www.ruby-forum.com/t/terminal-residue/173353>\
**Category:** Ruby\
**Created:** [August 7, 2009, 8:15am UTC](https://www.ruby-forum.com/t/terminal-residue/173353 "2009-08-07T08:15:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mellifluidic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@mellifluidic](https://www.ruby-forum.com/u/mellifluidic)\
**Post date:** [August 7, 2009, 8:15am UTC](https://www.ruby-forum.com/t/terminal-residue/173353/1 "2009-08-07T08:15:14Z")

</div>

Something really weird just happened - I just installed Ruby 1.9.1 using  
(essentially) Hivelogic’s method for rolling out my own Ruby install in  
my usr/local/src directory on my Mac running Leopard and although  
everything seems to be working okay (ruby -v yeilds the correct  
version), any time I enter anything into my terminal I get the normal  
behavior except that the line

-e:1:in `<main>': undefined method`grep’ for “”:String (NoMethodError)

shows up at the end of whatever the terminal returns. Even just hitting  
enter with nothing typed in at the prompt return the above line. Now,  
this looks like a ruby Error message, but I have no idea why the system  
would be returning this as it is. I did save the terminal output from  
the install process, so I have records of everything that I did and  
everything that happened. Has anyone ever seen anything like this or no  
how I could get it fixed? Very strange stuff.

Thanks

Chris

---

<div class="post-metadata">

**Author:** ![mellifluidic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@mellifluidic](https://www.ruby-forum.com/u/mellifluidic)\
**Post date:** [August 7, 2009, 9:49am UTC](https://www.ruby-forum.com/t/terminal-residue/173353/2 "2009-08-07T09:49:06Z")

</div>

2009/8/7 Christopher S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> enter with nothing typed in at the prompt return the above line. Now,  
> this looks like a ruby Error message, but I have no idea why the system  
> would be returning this as it is. I did save the terminal output from  
> the install process, so I have records of everything that I did and  
> everything that happened. Has anyone ever seen anything like this or no  
> how I could get it fixed? Very strange stuff.

I guess that this is related to a change in class String which might  
not be reflected in the code that uses it:

$ ruby -ve ‘“”.grep(/x/)’  
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]  
$ ruby19 -ve ‘“”.grep(/x/)’  
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin]  
-e:1:in `<main>': undefined method `grep’ for “”:String (NoMethodError)  
$ ruby19 -ve ‘puts String.ancestors’  
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin]  
String  
Comparable  
Object  
Kernel  
BasicObject  
$

Note the absence of Enumerable in String in 1.9.1. Maybe this helps  
you hunt down the issue.

Kind regards

robert

---

<div class="post-metadata">

**Author:** ![mellifluidic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@mellifluidic](https://www.ruby-forum.com/u/mellifluidic)\
**Post date:** [August 7, 2009, 11:13am UTC](https://www.ruby-forum.com/t/terminal-residue/173353/3 "2009-08-07T11:13:14Z")

</div>

> Note the absence of Enumerable in String in 1.9.1. Maybe this helps  
> you hunt down the issue.
> 
> Kind regards
> 
> robert

Thanks for the help - I forgot that my .bash\_login file had some ruby  
code in it and sure enough, that was the culprit.

Chris
