1[![Build Status](https://travis-ci.org/ruby/ruby.svg?branch=trunk)](https://travis-ci.org/ruby/ruby)
2[![Build status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/trunk?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/trunk)
3[![wercker status](https://app.wercker.com/status/e5e7e1704f62b76525022aa424aef6ef/s/trunk "wercker status")](https://app.wercker.com/project/byKey/e5e7e1704f62b76525022aa424aef6ef)
4
5# What's Ruby
6
7Ruby is the interpreted scripting language for quick and easy object-oriented
8programming. It has many features to process text files and to do system
9management tasks (as in Perl). It is simple, straight-forward, and
10extensible.
11
12## Features of Ruby
13
14*   Simple Syntax
15*   **Normal** Object-oriented Features (e.g. class, method calls)
16*   **Advanced** Object-oriented Features (e.g. mix-in, singleton-method)
17*   Operator Overloading
18*   Exception Handling
19*   Iterators and Closures
20*   Garbage Collection
21*   Dynamic Loading of Object Files (on some architectures)
22*   Highly Portable (works on many Unix-like/POSIX compatible platforms as
23    well as Windows, macOS, Haiku, etc.) cf.
24    https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#platform-maintainers
25
26
27## How to get Ruby
28
29For a complete list of ways to install Ruby, including using third-party tools
30like rvm, see:
31
32https://www.ruby-lang.org/en/downloads/
33
34The trunk of the Ruby source tree can be checked out with the following
35command:
36
37    $ svn co https://svn.ruby-lang.org/repos/ruby/trunk/ ruby
38
39Or if you are using git then use the following command:
40
41    $ git clone https://github.com/ruby/ruby.git
42
43There are some other branches under development. Try the following command
44to see the list of branches:
45
46    $ svn ls https://svn.ruby-lang.org/repos/ruby/branches/
47
48Or if you are using git then use the following command:
49
50    $ git ls-remote https://github.com/ruby/ruby.git
51
52## Ruby home page
53
54The URL of the Ruby home page is:
55
56https://www.ruby-lang.org/
57
58## Mailing list
59
60There is a mailing list to talk about Ruby. To subscribe to this list, please
61send the following phrase:
62
63    subscribe
64
65in the mail body (not subject) to the address
66<ruby-talk-request@ruby-lang.org>.
67
68## How to compile and install
69
70This is what you need to do to compile and install Ruby:
71
721.  If you want to use Microsoft Visual C++ to compile Ruby, read
73    [win32/README.win32](win32/README.win32) instead of this document.
74
752.  If `./configure` does not exist or is older than `configure.ac`, run
76    `autoconf` to (re)generate configure.
77
783.  Run `./configure`, which will generate `config.h` and `Makefile`.
79
80    Some C compiler flags may be added by default depending on your
81    environment. Specify `optflags=..` and `warnflags=..` as necessary to
82    override them.
83
844.  Edit `defines.h` if you need. Usually this step will not be needed.
85
865.  Remove comment mark(`#`) before the module names from `ext/Setup` (or add
87    module names if not present), if you want to link modules statically.
88
89    If you don't want to compile non static extension modules (probably on
90    architectures which do not allow dynamic loading), remove comment mark
91    from the line "`#option nodynamic`" in `ext/Setup`.
92
93    Usually this step will not be needed.
94
956.  Run `make`.
96
97    * On Mac, set RUBY\_CODESIGN environment variable with a signing identity.
98      It uses the identity to sign `ruby` binary. See also codesign(1).
99
1007.  Optionally, run '`make check`' to check whether the compiled Ruby
101    interpreter works well. If you see the message "`check succeeded`", your
102    Ruby works as it should (hopefully).
103
1048.  Optionally, run `make update-gems` and `make extract-gems`.
105
106    If you want to install bundled gems, run `make update-gems` and
107    `make extract-gems` before running `make install`.
108
1099.  Run '`make install`'.
110
111    This command will create the following directories and install files into
112    them.
113
114    *   `${DESTDIR}${prefix}/bin`
115    *   `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}`
116    *   `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
117    *   `${DESTDIR}${prefix}/lib`
118    *   `${DESTDIR}${prefix}/lib/ruby`
119    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
120    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
121    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby`
122    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
123    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
124    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
125    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
126    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
127    *   `${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}`
128    *   `${DESTDIR}${prefix}/share/man/man1`
129    *   `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system`
130
131
132    If Ruby's API version is '*x.y.z*', the `${MAJOR}` is '*x*', the
133    `${MINOR}` is '*y*', and the `${TEENY}` is '*z*'.
134
135    **NOTE**: teeny of the API version may be different from one of Ruby's
136    program version
137
138    You may have to be a super user to install Ruby.
139
140
141If you fail to compile Ruby, please send the detailed error report with the
142error log and machine/OS type, to help others.
143
144Some extension libraries may not get compiled because of lack of necessary
145external libraries and/or headers, then you will need to run '`make distclean-ext`'
146to remove old configuration after installing them in such case.
147
148## Copying
149
150See the file [COPYING](COPYING).
151
152## Feedback
153
154Questions about the Ruby language can be asked on the Ruby-Talk mailing list
155(https://www.ruby-lang.org/en/community/mailing-lists) or on websites like
156(https://stackoverflow.com).
157
158Bug reports should be filed at https://bugs.ruby-lang.org. Read [HowToReport] for more information.
159
160[HowToReport]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToReport
161
162## Contributing
163
164See the file [CONTRIBUTING.md](CONTRIBUTING.md)
165
166
167## The Author
168
169Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in
1701995.
171
172<matz@ruby-lang.org>
173