Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
1-getting-started-with-rails
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mis-21-2018-intersession
1-getting-started-with-rails
Commits
7cf7fbaf
Commit
7cf7fbaf
authored
Jun 05, 2018
by
John Noel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated README.md
parent
c78fd29f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
README.md
README.md
+20
-10
No files found.
README.md
View file @
7cf7fbaf
...
@@ -11,7 +11,7 @@ git clone https://gitlab.discs.ateneo.edu/mis-21-2018-intersession/1-getting-sta
...
@@ -11,7 +11,7 @@ git clone https://gitlab.discs.ateneo.edu/mis-21-2018-intersession/1-getting-sta
```
```
**Note**
: You can replace the name of the project e.g.
``sample_app``
to any preferred project name.
**Note**
: You can replace the name of the project e.g.
``sample_app``
to any preferred project name.
*
Go inside the cloned repository
*
Go inside the cloned repository
.
```
bash
```
bash
cd
sample_app
cd
sample_app
...
@@ -23,21 +23,21 @@ cd sample_app
...
@@ -23,21 +23,21 @@ cd sample_app
chmod
+x start
chmod
+x start
```
```
*
Make sure to re-initialize own Git repository
*
Make sure to re-initialize own Git repository
.
```
bash
```
bash
rm
-rf
.git
rm
-rf
.git
git init
git init
```
```
*
Run this command to identify the current directory
*
Run this command to identify the current directory
.
```
bash
```
bash
pwd
pwd
```
```
**Note**
: Take note of the output of this command. This shall serve as an input value to the next commands.
**Note**
: Take note of the output of this command. This shall serve as an input value to the next commands.
*
Build and start Docker containers
*
Build and start Docker containers
.
```
bash
```
bash
docker-compose build
docker-compose build
...
@@ -56,26 +56,36 @@ sample_app_web_1 exited with code 0
...
@@ -56,26 +56,36 @@ sample_app_web_1 exited with code 0
cd
<
command
output of the previous
pwd command
>
cd
<
command
output of the previous
pwd command
>
```
```
*
Stop Docker containers
*
Stop Docker containers
.
```
bash
```
bash
docker-compose down
docker-compose down
```
```
*
Create a new Rails project
*
Create a new Rails project
.
```
bash
```
bash
docker-compose run web rails new
.
--force
--database
=
postgresql
docker-compose run web rails new
.
--force
--database
=
postgresql
```
```
**Notes**
: You can remove
``--database=postgresql``
if a different database engine will be used.
**Notes**
:
-
You can remove
``--database=postgresql``
if a different database engine will be used.
-
This will take a while. Proceed with the next step ONLY after a similar message shows up.
*
In one of the two opened Terminal (Mac/Unix) / Powershell (Windows), start again Docker containers
```
bash
Bundle
complete
!
18 Gemfile dependencies, 78 gems now installed.
Use
`
bundle info
[
gemname]
`
to see where a bundled gem is installed.
run bundle
exec
spring binstub
--all
*
bin/rake: spring inserted
*
bin/rails: spring inserted
```
*
In one of the two opened Terminal (Mac/Unix) / Powershell (Windows), start again Docker containers.
```
bash
```
bash
docker-compose up
docker-compose up
```
```
*
Edit
``config/database.yml``
*
Edit
``config/database.yml``
.
```
bash
```
bash
default: &default
default: &default
...
@@ -101,7 +111,7 @@ production:
...
@@ -101,7 +111,7 @@ production:
password: <%
=
ENV[
'RAILS_DATABASE_PASSWORD'
]
%>
password: <%
=
ENV[
'RAILS_DATABASE_PASSWORD'
]
%>
```
```
*
Create the
``development``
and
``test``
databases
*
Create the
``development``
and
``test``
databases
.
```
bash
```
bash
docker-compose run web rails db:create
docker-compose run web rails db:create
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment