You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rails6/en/chapter00-before.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ NOTE: This book is also available in the Molière language (It means french).
13
13
14
14
My name is http://rousseau-alexandre.fr[Alexandre Rousseau] and I am a Rails developer with more than 4 years of experience (at the time of writing). I am currently a partner in a company (https://isignif.fr[iSignif]) where I build and maintain a SAAS product using Rails. I also contribute to the Ruby community by producing and maintaining some gems that you can consult on https://rubygems.org/profiles/madeindjs[my Rubygems.org profile]. Most of my projects are on GitHub so don’t http://github.com/madeindjs/[hesitate to follow me].
15
15
16
-
All the source code of this book is available in https://asciidoctor.org/[Asciidoctor] format on https://github.com/madeindjs/api_on_rails[GitHub]. So don’t hesitate to https://github.com/madeindjs/api_on_rails/fork[forke] the project if you want to improve it or fix a mistake that I didn’t notice.
16
+
All the source code of this book is available in https://asciidoctor.org/[Asciidoctor] format on https://github.com/madeindjs/api_on_rails[GitHub]. So feel free to https://github.com/madeindjs/api_on_rails/fork[forke] the project if you want to improve it or fix a mistake that I didn’t notice.
Copy file name to clipboardExpand all lines: rails6/en/chapter01-introduction.adoc
+8-20Lines changed: 8 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,12 +86,10 @@ $ ruby -v
86
86
87
87
Rails 6.0 requires the installation of version 2.5 or higher.
88
88
89
-
I recommend using http://rvm.io/[Ruby Version Manager (RVM)] or http://rbenv.org/[rbenv] to install it.
89
+
I recommend using http://rvm.io/[Ruby Version Manager (RVM)] or http://rbenv.org/[rbenv] to install it. We will use RVM in this tutorial but it doesn't matter which of these two options you use
90
90
91
91
The principle of these tools is allowing you to install several versions of Ruby on the same machine, in an environment that is airtight to a possible version installed on your operating system and to be able to switch from one to the other easily.
92
92
93
-
In this tutorial, we will use RVM but it doesn't matter which of these two options you use.
94
-
95
93
To install RVM, go to https://rvm.io/ and install the GPG footnote key:[The GPG key allows you to verify the identity of the author of the sources you download.]. Once that's done:
96
94
97
95
[source,bash]
@@ -107,7 +105,7 @@ Next it is time to install ruby:
107
105
$ rvm install 2.6
108
106
----
109
107
110
-
If everything went smooth, it is time to install the rest of the dependencies we will be using.
108
+
Now it is time to install the rest of the dependencies we will be using.
111
109
112
110
==== Gems, Rails & Missing libraries
113
111
@@ -129,9 +127,7 @@ We then install the necessary gems and ignore documentation for each gem:
129
127
130
128
[source,bash]
131
129
----
132
-
$ printf 'gem: --no-document' >> ~/.gemrc
133
130
$ gem install bundler
134
-
$ gem install foreman
135
131
$ gem install rails -v 6.0.0.rc1
136
132
----
137
133
@@ -147,7 +143,7 @@ Rails 6.0.0.rc1
147
143
148
144
==== Database
149
145
150
-
I highly recommend you installing http://www.postgresql.org/[Postgresql] to manage your databases, but for simplicity we’ll be using http://www.sqlite.org/[SQlite]. If you are using Mac OS you should be ready to go, in case you are on Linux, don’t worry we have you covered:
146
+
I highly recommend you installing http://www.postgresql.org/[Postgresql] to manage your databases. But here we’ll using http://www.sqlite.org/[SQlite] for simplicity . If you are using Mac OS you should be ready to go, in case you are on Linux, don’t worry we have you covered:
Initializing a Rails application must be pretty straightforward for you, if that is not the case, here is a super quick tutorial.
162
+
Initializing a Rails application may be pretty straightforward for you. If that is not the case here is a super quick tutorial.
167
163
168
164
There is the command:
169
165
@@ -176,30 +172,22 @@ $ rails new market_place_api --api
176
172
177
173
NOTE: The `--api` option appeared in version 5 of Rails. It allows to limit the libraries and _Middleware_ included in the application. This also avoids generating HTML views when using Rails generators.
178
174
179
-
As you may guess, the commands above will generate the bare bones of your Rails application. The next step is to add some `gems` we’ll be using to build the api.
175
+
As you may guess, the commands above will generate the bare bones of your Rails application.
180
176
181
177
== Versioning
182
178
183
-
Remember that Git helps you track and maintain your code history. Keep in mind that the source code of the application is published on GitHub. You can follow the project on https://github.com/madeindjs/api_on_rails_6[GitHub]
179
+
Remember that Git helps you track and maintain your code history. Keep in mind that the source code of the application is published on GitHub. You can follow the project on https://github.com/madeindjs/api_on_rails_6[GitHub].
184
180
185
-
When you used the `rails new` command, Ruby on Rails initialized the Git directory for you. This means that you do not need to execute the `git init` command.
181
+
Ruby on Rails initialized the Git directory for you when you used the `rails new` command. This means that you do not need to execute the `git init` command.
186
182
187
-
However, it is necessary to configure the information of the author of _commits_. If you have not already done so, go to the directory and run the following commands:
183
+
However it is necessary to configure the information of the author of _commits_. If you have not already done so, go to the directory and run the following commands:
188
184
189
185
[source,bash]
190
186
----
191
187
$ git config --global user.name "Type in your name"
192
188
$ git config --global user.email "Type in your email"
193
189
----
194
190
195
-
196
-
Rails already initialize the new project as a brand new Git repository. If you encounter some problem you can initialize project like this:
197
-
198
-
[source,bash]
199
-
----
200
-
$ git init
201
-
----
202
-
203
191
Rails also provide a _.gitignore_ file to ignore some files that we don’t want to track. The default _.gitignore_ file should looks like the one shown below:
0 commit comments