# Ruby and irb

**URL:** <https://rubytalk.org/t/ruby-and-irb/41739>\
**Category:** ruby-talk\
**Created:** [29 October 2007 08:36 UTC](https://rubytalk.org/t/ruby-and-irb/41739 "2007-10-29T08:36:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@Paulo\_Carvalho](https://rubytalk.org/u/Paulo_Carvalho)\
**Post date:** [29 October 2007 08:36 UTC](https://rubytalk.org/t/ruby-and-irb/41739/1 "2007-10-29T08:36:03Z")

</div>

Hello

I have a problem with irb console.

When i want to write special characters like "@" and "[" or "]" i cant.  
IRB simply dont let me write this characters. It is like if i was not  
writing on the beyboard.

Any help?

thanks

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![\_Pena\_Botp1](https://avatars.discourse-cdn.com/v4/letter/_/94ad74/32.png) [@\_Pena\_Botp1](https://rubytalk.org/u/_Pena_Botp1)\
**Post date:** [29 October 2007 08:47 UTC](https://rubytalk.org/t/ruby-and-irb/41739/2 "2007-10-29T08:47:23Z")

</div>

On Behalf Of Paulo Carvalho:  
# I have a problem with irb console.  
# When i want to write special characters like "@" and "[" or  
# "]" i cant. IRB simply dont let me write this characters. It  
# is like if i was not writing on the beyboard.

i'm assumming you do not have an english keyboard,

try

&nbsp;&nbsp;irb --noreadline

kind regards -botp

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@Paulo\_Carvalho](https://rubytalk.org/u/Paulo_Carvalho)\
**Post date:** [29 October 2007 09:02 UTC](https://rubytalk.org/t/ruby-and-irb/41739/3 "2007-10-29T09:02:05Z")

</div>

Yes you are right. Thank you.

Now instead of executing "irb --noreadline" is there a place where i can  
put the "--noreadline" option to be executed always when irb is called?

My problem is that, i am debugging an application with the "breakpoint"  
instruction. This instruction opens an irb console. So I would like that  
the irb console to be called automatically with the noreadline option...

Do you know how can I make it?

thanks

Peña, Botp wrote:

> **···**
>
> > On Behalf Of Paulo Carvalho:  
> > # I have a problem with irb console.  
> > # When i want to write special characters like "@" and "[" or  
> > # "]" i cant. IRB simply dont let me write this characters. It  
> > # is like if i was not writing on the beyboard.
> > 
> > i'm assumming you do not have an english keyboard,
> > 
> > try
> > 
> > &nbsp;&nbsp;irb --noreadline
> > 
> > kind regards -botp
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![\_Pena\_Botp1](https://avatars.discourse-cdn.com/v4/letter/_/94ad74/32.png) [@\_Pena\_Botp1](https://rubytalk.org/u/_Pena_Botp1)\
**Post date:** [29 October 2007 09:28 UTC](https://rubytalk.org/t/ruby-and-irb/41739/4 "2007-10-29T09:28:25Z")

</div>

# Now instead of executing "irb --noreadline" is there a place  
# where i can put the "--noreadline" option to be executed always  
# when irb is called?

> **···**
>
> From: Paulo Carvalho [[mailto:pjcarvalho@gmail.com](mailto:pjcarvalho@gmail.com)]  
> #  
> # My problem is that, i am debugging an application with the  
> # "breakpoint"  
> # instruction. This instruction opens an irb console. So I  
> # would like that  
> # the irb console to be called automatically with the  
> # noreadline option...  
> #  
> # Do you know how can I make it?
> 
> maybe, 2 ways
> 
> 1. modify the irb shellscript (in windows it's a batch file)
> 
> or
> 
> 2. create/modify your .irbrc file  
> if you have an existing .irbrc file (it's just a ruby file that irb loads by default if it exists), try putting the ff line (pref at the top) of th irbrc script
> 
> &nbsp;&nbsp;&nbsp;ARGV.concat["--noreadline"]
> 
> the second option is more flexible and recommended, imho
> 
> kind regards -botp

---

<div class="post-metadata">

**Author:** ![Leonard\_Chin](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@Leonard\_Chin](https://rubytalk.org/u/Leonard_Chin)\
**Post date:** [29 October 2007 09:34 UTC](https://rubytalk.org/t/ruby-and-irb/41739/5 "2007-10-29T09:34:17Z")

</div>

Hi

> **···**
>
> On 10/29/07, Paulo Carvalho \<pjcarvalho@gmail.com\> wrote:
> 
> > Yes you are right. Thank you.
> > 
> > Now instead of executing "irb --noreadline" is there a place where i can  
> > put the "--noreadline" option to be executed always when irb is called?
> 
> Try putting the following option in your .irbrc file
> 
> IRB.conf[:USE\_READLINE] = nil
> 
> The pickaxe has more:  
> [http://www.ruby-doc.org/docs/ProgrammingRuby/html/irb.html](http://www.ruby-doc.org/docs/ProgrammingRuby/html/irb.html)

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@Paulo\_Carvalho](https://rubytalk.org/u/Paulo_Carvalho)\
**Post date:** [29 October 2007 10:14 UTC](https://rubytalk.org/t/ruby-and-irb/41739/6 "2007-10-29T10:14:04Z")

</div>

Thanks

I created the .irbrc file (because i dont have anyone) but it seems that  
is not used.  
I am in windows with instant rails. I created the file in the  
\InstantRails\ruby directory but I think it is not the right place to  
have it.

Am I wrong?

regards

Peña, Botp wrote:

> **···**
>
> > From: Paulo Carvalho [mailto:pjcarvalho@gmail.com]  
> > # Now instead of executing "irb --noreadline" is there a place  
> > # where i can put the "--noreadline" option to be executed always  
> > # when irb is called?  
> > #  
> > # My problem is that, i am debugging an application with the  
> > # "breakpoint"  
> > # instruction. This instruction opens an irb console. So I  
> > # would like that  
> > # the irb console to be called automatically with the  
> > # noreadline option...  
> > #  
> > # Do you know how can I make it?
> > 
> > maybe, 2 ways
> > 
> > 1. modify the irb shellscript (in windows it's a batch file)
> > 
> > or
> > 
> > 2. create/modify your .irbrc file  
> > if you have an existing .irbrc file (it's just a ruby file that irb  
> > loads by default if it exists), try putting the ff line (pref at the  
> > top) of th irbrc script
> > 
> > &nbsp;&nbsp;&nbsp;ARGV.concat["--noreadline"]
> > 
> > the second option is more flexible and recommended, imho
> > 
> > kind regards -botp
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@Paulo\_Carvalho](https://rubytalk.org/u/Paulo_Carvalho)\
**Post date:** [29 October 2007 11:08 UTC](https://rubytalk.org/t/ruby-and-irb/41739/7 "2007-10-29T11:08:57Z")

</div>

I found the problem.

Thanks

regards

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
