File.open(path, "wb")

At: http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm

And, in:

File.open(path, "wb")

What is meant by "wb"?

Thanks.

···

--
Posted via http://www.ruby-forum.com/.

Abder-Rahman Ali wrote:

At: Ruby on Rails - File Uploading

And, in:

File.open(path, "wb")

What is meant by "wb"?

Your first port of call should be the documentation. Go to:

http://ruby-doc.org/core/

and in the top right pane select open(IO). This is because File is a
subclass of IO and inherits the open method - admittedly this is not
clear to a newcomer. Then scroll to the top of the page to see a list of
all the mode strings.

Or, at the command prompt, just type "ri IO"

···

--
Posted via http://www.ruby-forum.com/\.

I got it @Brian. Thanks a lot.

···

--
Posted via http://www.ruby-forum.com/.