This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ReadMe
127 lines (75 loc) · 3.06 KB
/
ReadMe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Documentation
Required frameworks
Ruby on Rails, PostgreSQL ReactJS, Node.js, npm (included in most Node.js installers), yarn
## Installation guide (Always control versions, given versions are currently in use for this project)
### Linux (Ubuntu) (requires configured git account)
Open Terminal (ctrl+alt+t)
Add Webpacker support by adding Node.js and yarn repositories
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
Install Ruby via rbenv (rbenv install included)
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.7.0
rbenv global 2.7.0
ruby -v
Install additional bundler
gem install bundler
Install Rails (check for correct version first)
gem install rails -v 6.0.2.1
rbenv rehash
check version
rails -v
Install PostgreSQL (12.2):
sudo apt install postgresql-12 libpq-dev
You have to setup a user with permission to create databases
sudo -u postgres createuser [username] -s
If you would like to set a password for the user, you can do the following
sudo -u postgres psql
postgres=# \password [passowrd]
Create db:
rails db:create
rails db:migrate
rake db:data:load
### Windows
Node.js:
Download Node.js (12.16.1) from 'https://nodejs.org/en/download/' and install, npm (6.13.4) is included
Yarn
Download yarn (v1.22.4) from 'https://classic.yarnpkg.com/en/docs/install/#windows-stable' and install
Alternatively use Chocolatey (Package manager for windows)
Ruby (2.7.0)
Download Ruby from 'https://rubyinstaller.org/downloads/' and install
Check version:
C:\ ruby -v
Open CMD to install Rails (6.0.2.1) (windows + R, type "cmd", hit enter)
C:\> gem install Rails
If you installed Ruby on a drive other than your C:\ (as in not your system drive), change directory to the Ruby drive:
C:\> cd\
C:\> d: (as example for changing to drive D:\
Check version:
C:\> rails -v
Some installers include nokogiri (1.10.8), in case of errors due to wrong version or absence try the following commands
gem install nokogiri
gem install nokogiri -v '2.9.10' (as of this moment the latest version is '2.9.10'
gem install nokogiri --platform=ruby
Check version:
C:\> nokogiri -v
PostgreSQL
Download PostgreSQL (12.2) from 'https://www.postgresql.org/download/windows/' and install
setup user with permission to create databases
Create db:
rails db:create
rails db:migrate
rake db:data:load