# Gets and ARGV?

**URL:** <https://www.ruby-forum.com/t/gets-and-argv/182179>\
**Category:** Ruby\
**Created:** [January 24, 2010, 6:46am UTC](https://www.ruby-forum.com/t/gets-and-argv/182179 "2010-01-24T06:46:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinkwritemute](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@thinkwritemute](https://www.ruby-forum.com/u/thinkwritemute)\
**Post date:** [January 24, 2010, 6:46am UTC](https://www.ruby-forum.com/t/gets-and-argv/182179/1 "2010-01-24T06:46:49Z")

</div>

Code \>

option = input[0]  
values = input[1,input.length]

print '#Message: ’  
i = gets

Active \>

thinkwritemute@thinkwritemute-netbook:~/Dropbox/Public/Repositories/ruby/twt$  
ruby twt.rb post  
#Message: twt.rb:181:in `gets': No such file or directory - post (Errno::ENOENT) from twt.rb:181:in`gets’  
from twt.rb:181:in `’

---

<div class="post-metadata">

**Author:** ![thinkwritemute](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@thinkwritemute](https://www.ruby-forum.com/u/thinkwritemute)\
**Post date:** [January 24, 2010, 8:02am UTC](https://www.ruby-forum.com/t/gets-and-argv/182179/2 "2010-01-24T08:02:35Z")

</div>

Kurtis Rainbolt-greene wrote:

> thinkwritemute@thinkwritemute-netbook:~/Dropbox/Public/Repositories/ruby/twt$  
> ruby twt.rb post  
> #Message: twt.rb:181:in `gets': No such file or directory - post (Errno::ENOENT) from twt.rb:181:in `gets’  
> from twt.rb:181:in `’

If you wish to be certain to get input from stdin, use $stdin.gets

[http://ruby-doc.org/core/classes/Kernel.html#M005955](http://ruby-doc.org/core/classes/Kernel.html#M005955)

-Justin
