Skip to content

Commit 48ded00

Browse files
authored
Update Documentation and Installation pages (en)
Merge pull request #1877 from olivierlacan/official-api-docs
2 parents 769fad0 + 1f6e5aa commit 48ded00

File tree

3 files changed

+91
-98
lines changed

3 files changed

+91
-98
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ locales:
827827
description: |
828828
Get in contact with Rubyists in your area.
829829
weblogs:
830-
text: Weblogs
830+
text: Blogs
831831
url: /en/community/weblogs/
832832
description: |
833833
Read about what’s happening right now in the Ruby community.

en/documentation/index.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,16 @@ title: "Documentation"
44
lang: en
55
---
66

7-
Here you will find pointers to manuals, tutorials and references that
8-
will come in handy when you feel like coding in Ruby.
7+
Guides, tutorials and reference material to help you learn more about Ruby
98
{: .summary}
109

1110
### Installing Ruby
1211

13-
Unless you only want to try Ruby in the browser (see the links below)
14-
you need to have Ruby installed on your computer.
15-
You can check whether Ruby already is available by opening a terminal
16-
and typing
17-
18-
{% highlight sh %}
19-
ruby -v
20-
{% endhighlight %}
21-
22-
This should output some information on the installed Ruby version.
23-
If not, see the [installation page](installation/) for various options
24-
of getting Ruby.
12+
Although you can easily [try Ruby in your browser][1], you can also read
13+
the [installation guide](installation/) for help on installing Ruby.
2514

2615
### Getting Started
2716

28-
[Try Ruby!][1]
29-
: An interactive tutorial that lets you try out Ruby right in your
30-
browser. This 15-minute tutorial is aimed at beginners who want to get
31-
a feeling of the language.
32-
3317
[Official FAQ](/en/documentation/faq/)
3418
: The official frequently asked questions.
3519

@@ -43,14 +27,6 @@ of getting Ruby.
4327
through stories, wit, and comics. Originally created by *why the lucky
4428
stiff*, this guide remains a classic for Ruby learners.
4529

46-
[Ruby in Twenty Minutes](/en/documentation/quickstart/)
47-
: A nice tutorial covering the basics of Ruby. From start to finish it
48-
shouldn’t take you more than twenty minutes.
49-
50-
[Ruby from Other Languages](/en/documentation/ruby-from-other-languages/)
51-
: Coming to Ruby from another language? Whether it’s C, C++, Java, Perl,
52-
PHP, or Python, this article has you covered!
53-
5430
[Learning Ruby][6]
5531
: A thorough collection of Ruby study notes for those who are new to the
5632
language and in search of a solid introduction to Ruby’s concepts and
@@ -85,6 +61,10 @@ of getting Ruby.
8561

8662
### Reference Documentation
8763

64+
[Official API Documentation][40]
65+
: The official Ruby API documentation for different versions including
66+
the currently unreleased (trunk) version.
67+
8868
[Ruby Core Reference][13]
8969
: Pulled straight from the source code using [RDoc][14], this reference
9070
work documents all of the core classes and modules (like String,
@@ -191,4 +171,5 @@ If you have questions about Ruby the
191171
[37]: http://www.sublimetext.com/
192172
[38]: http://ruby.learncodethehardway.org/
193173
[39]: http://kapeli.com/dash
174+
[40]: https://docs.ruby-lang.org/en/
194175
[atom]: https://atom.io/

en/documentation/installation/index.md

Lines changed: 82 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,40 @@ title: "Installing Ruby"
44
lang: en
55
---
66

7-
You can use several tools to install Ruby.
8-
This page describes how to use major package management systems
9-
and third-party tools for managing and installing Ruby
10-
and how to build Ruby from source.
7+
With package managers or third-party tools, you have plenty of options
8+
to install and manage Ruby.
119
{: .summary}
1210

11+
You may already have Ruby installed on your computer. You can check
12+
inside a [terminal emulator][terminal] by typing:
13+
14+
{% highlight sh %}
15+
ruby -v
16+
{% endhighlight %}
17+
18+
This should output some information on the installed Ruby version.
1319

1420
## Choose Your Installation Method
1521

1622
There are several ways to install Ruby:
1723

18-
* When you are on a UNIX-like operating system, using your system's
19-
**package manager** is the easiest way of getting started.
20-
However, the packaged Ruby version usually is not the newest one.
24+
* On a UNIX-like operating system, using your system's **package
25+
manager** is easiest. However, the packaged Ruby version may not be
26+
the newest one.
2127
* **Installers** can be used to install a specific or multiple
2228
Ruby versions. There is also an installer for Windows.
23-
* **Managers** help you to switch between multiple Ruby installations
29+
* **Managers** help you to switch between multiple Ruby versions
2430
on your system.
25-
* And finally, you can also **build Ruby from source**.
31+
* Finally, you can also **build Ruby from source**.
2632

27-
The following overview lists available installation methods
28-
for different needs and platforms.
33+
Here are available installation methods:
2934

3035
* [Package Management Systems](#package-management-systems)
3136
* [Debian, Ubuntu](#apt)
3237
* [CentOS, Fedora, RHEL](#yum)
3338
* [Gentoo](#portage)
3439
* [Arch Linux](#pacman)
35-
* [OS X](#homebrew)
40+
* [macOS](#homebrew)
3641
* [FreeBSD](#freebsd)
3742
* [Solaris, OpenIndiana](#solaris)
3843
* [Other Distributions](#other-systems)
@@ -55,20 +60,19 @@ for different needs and platforms.
5560
If you cannot compile your own Ruby, and you do not want to use a
5661
third-party tool, you can use your system's package manager to install Ruby.
5762

58-
Certain members in the Ruby community feel very strongly that you should
59-
never use a package manager to install Ruby and that you should use tools
60-
instead. While the full list of pros and cons is outside of the scope
61-
of this page, the most basic reason is that most package managers have
62-
older versions of Ruby in their official repositories. If you would like to
63-
use the newest Ruby, make sure you use the correct package name,
64-
or use the tools described further below instead.
63+
Some members of the Ruby community feel that you should avoid package
64+
managers to install Ruby and that you should use dedicated tools instead.
6565

66+
It's possible that major package managers will install older Ruby
67+
versions instead of the latest release. To use the latest Ruby release,
68+
check that the package name matches its version number. Or use a
69+
dedicated [installer][installers].
6670

6771
### apt (Debian or Ubuntu)
6872
{: #apt}
6973

70-
Debian GNU/Linux and Ubuntu use the apt package manager.
71-
You can use it like this:
74+
Debian GNU/Linux and Ubuntu use the apt package manager. You can use it
75+
like this:
7276

7377
{% highlight sh %}
7478
$ sudo apt-get install ruby-full
@@ -101,9 +105,9 @@ Gentoo uses the portage package manager.
101105
$ sudo emerge dev-lang/ruby
102106
{% endhighlight %}
103107

104-
By default, this will try to install versions 1.9 and 2.0,
105-
but more versions are available.
106-
To install a specific version, set `RUBY_TARGETS` in your `make.conf`.
108+
By default, this will try to install versions 1.9 and 2.0, but more
109+
versions are available. To install a specific version, set
110+
`RUBY_TARGETS` in your `make.conf`.
107111
See the [Gentoo Ruby Project website][gentoo-ruby] for details.
108112

109113

@@ -120,13 +124,14 @@ $ sudo pacman -S ruby
120124
This should install the latest stable Ruby version.
121125

122126

123-
### Homebrew (OS X)
127+
### Homebrew (macOS)
124128
{: #homebrew}
125129

126-
On macOS (High) Sierra and OS X El Capitan, Ruby 2.0 is included.
130+
Ruby versions 2.0 and above are included by default in macOS releases
131+
since at least El Capitan (10.11) all the way through Mojave (10.14).
127132

128-
Many people on OS X use [Homebrew][homebrew] as a package manager.
129-
It is really easy to get a newer version of Ruby using Homebrew:
133+
[Homebrew][homebrew] is a commonly used package manager on macOS.
134+
Installing a Ruby using Homebrew is easy:
130135

131136
{% highlight sh %}
132137
$ brew install ruby
@@ -178,48 +183,48 @@ latest version of Ruby.
178183
### Other Distributions
179184
{: #other-systems}
180185

181-
On other systems, you can search the package repository of your
182-
Linux distribution's manager for Ruby, or the third-party tools might be the
183-
right choice for you.
186+
On other systems, you can search the package repository of your Linux
187+
distribution's manager for Ruby. Alternatively, you can use a
188+
[third-party installer][installers].
184189

185190

186191
## Installers
187192
{: #installers}
188193

189-
If the version of Ruby provided by your system or package manager is out of
190-
date, a newer one can be installed using a third-party installer.
191-
Some of them also allow you to install multiple versions on the same system;
192-
associated managers can help to switch between the different Rubies.
193-
If you are planning to use [RVM](#rvm) as a version manager you do not need
194-
a separate installer, it comes with its own.
194+
If the version of Ruby provided by your system or package manager is out
195+
of date, a newer one can be installed using a third-party installer.
196+
197+
Some installers allow you to install multiple versions on the same
198+
system; associated managers can help to switch between the different
199+
Rubies.
200+
201+
If you are planning to use [RVM](#rvm) as a version manager you don't
202+
need a separate installer, it comes with its own.
195203

196204

197205
### ruby-build
198206
{: #ruby-build}
199207

200-
[ruby-build][ruby-build] is a plugin for [rbenv](#rbenv) that
201-
allows you to compile and install different versions of Ruby
202-
into arbitrary directories.
203-
ruby-build can also be used as a standalone program without rbenv.
204-
It is available for OS X, Linux, and other UNIX-like operating systems.
208+
[ruby-build][ruby-build] is a plugin for [rbenv](#rbenv) that allows you
209+
to compile and install different versions of Ruby. ruby-build can also
210+
be used as a standalone program without rbenv. It is available for macOS,
211+
Linux, and other UNIX-like operating systems.
205212

206213

207214
### ruby-install
208215
{: #ruby-install}
209216

210217
[ruby-install][ruby-install] allows you to compile and install different
211-
versions of Ruby into arbitrary directories.
212-
There is also a sibling, [chruby](#chruby), which handles switching between
213-
Ruby versions.
214-
It is available for OS X, Linux, and other UNIX-like operating systems.
218+
versions of Ruby into arbitrary directories. [chruby](#chruby) is a
219+
complimentary tool used to switch between Ruby versions. It's available
220+
for macOS, Linux, and other UNIX-like operating systems.
215221

216222

217223
### RubyInstaller
218224
{: #rubyinstaller}
219225

220-
If you are on Windows, there is a great project to help you install Ruby:
221-
[RubyInstaller][rubyinstaller]. It gives you everything you need to set up
222-
a full Ruby development environment on Windows.
226+
On Windows, [RubyInstaller][rubyinstaller] gives you everything you need
227+
to set up a full Ruby development environment.
223228

224229
Just download it, run it, and you are done!
225230

@@ -230,60 +235,60 @@ Just download it, run it, and you are done!
230235
If you are installing Ruby in order to use Ruby on Rails,
231236
you can use the following installers:
232237

233-
* [RailsInstaller][railsinstaller],
234-
which uses RubyInstaller but gives you
235-
extra tools that help with Rails development.
236-
It supports OS X and Windows.
237-
* [Bitnami Ruby Stack][rubystack],
238-
which provides a complete development environment for Rails.
239-
It supports OS X, Linux, Windows, virtual machines, and cloud images.
238+
* [RailsInstaller][railsinstaller] uses [RubyInstaller][rubyinstaller]
239+
but gives you extra tools that help with Rails development. It
240+
supports macOS and Windows.
241+
* [Bitnami Ruby Stack][rubystack] provides a complete development
242+
environment for Rails. It supports macOS, Linux, Windows, virtual
243+
machines, and cloud images.
240244

241245

242246
## Managers
243247
{: #managers}
244248

245-
Many Rubyists use Ruby managers to manage multiple Rubies.
246-
They confer various advantages but are not officially supported.
247-
Their respective communities are very helpful, however.
249+
Many Rubyists use Ruby managers to manage multiple Rubies. They allow
250+
easy or even automatic switching between Ruby versions depending on the
251+
project and other advantages but are not officially supported. You can
252+
however find support within their respective communities.
248253

249254

250255
### chruby
251256
{: #chruby}
252257

253-
[chruby][chruby] allows you to switch between multiple Rubies.
254-
chruby can manage Rubies installed by [ruby-install](#ruby-install)
255-
or even built from source.
258+
[chruby][chruby] allows you to switch between multiple Rubies. It can
259+
manage Rubies installed by [ruby-install](#ruby-install) or even built
260+
from source.
256261

257262

258263
### rbenv
259264
{: #rbenv}
260265

261266
[rbenv][rbenv] allows you to manage multiple installations of Ruby.
262-
It does not support installing Ruby, but there is a popular plugin
263-
named [ruby-build](#ruby-build) to install Ruby.
264-
Both tools are available for OS X, Linux, or other UNIX-like operating systems.
267+
While it can't install Ruby by default, its [ruby-build](#ruby-build)
268+
plugin can. Both tools are available for macOS, Linux, or other
269+
UNIX-like operating systems.
265270

266271

267272
### RVM ("Ruby Version Manager")
268273
{: #rvm}
269274

270-
[RVM][rvm] allows you to install and manage multiple installations of Ruby
271-
on your system. It can also manage different gemsets.
272-
It is available for OS X, Linux, or other UNIX-like operating systems.
275+
[RVM][rvm] allows you to install and manage multiple installations of
276+
Ruby on your system. It can also manage different gemsets. It is
277+
available for macOS, Linux, or other UNIX-like operating systems.
273278

274279

275280
### uru
276281
{: #uru}
277282

278283
[Uru][uru] is a lightweight, multi-platform command line tool that helps you
279-
to use multiple Rubies on OS X, Linux, or Windows systems.
284+
to use multiple Rubies on macOS, Linux, or Windows systems.
280285

281286

282287
## Building from Source
283288
{: #building-from-source}
284289

285290
Of course, you can install Ruby from source.
286-
[Download](/en/downloads/) and unpack a tarball, then just do this:
291+
[Download][download] and unpack a tarball, then just do this:
287292

288293
{% highlight sh %}
289294
$ ./configure
@@ -294,6 +299,9 @@ $ sudo make install
294299
By default, this will install Ruby into `/usr/local`.
295300
To change, pass the `--prefix=DIR` option to the `./configure` script.
296301

302+
You can find more information about building from source in the [Ruby
303+
README file][readme].
304+
297305
Using the third-party tools or package managers might be a better idea,
298306
though, because the installed Ruby won't be managed by any tools.
299307

@@ -314,3 +322,7 @@ though, because the installed Ruby won't be managed by any tools.
314322
[freebsd-ruby]: https://wiki.freebsd.org/Ruby
315323
[freebsd-ports-collection]: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
316324
[homebrew]: http://brew.sh/
325+
[terminal]: https://en.wikipedia.org/wiki/List_of_terminal_emulators
326+
[download]: /en/downloads/
327+
[installers]: /en/documentation/installation/#installers
328+
[readme]: https://github.com/ruby/ruby#how-to-compile-and-install

0 commit comments

Comments
 (0)