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.

Abder-Rahman A. wrote:

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

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”

I got it @Brian. Thanks a lot.