First, install the version manager asdf-vm
:
yay -S asdf-vm
Install sqlite:
yay -S sqlite
Check:
sqlite3 --version
asdf plugin-add ruby
asdf plugin install ruby 2.6.3
asdf global ruby 2.6.3
Check:
ruby --version
asdf plugin-add nodejs
asdf plugin install nodejs 12.2.0
asdf global nodejs 12.2.0
Check:
node --version
Install rails:
gem install rails
Check:
rails --version
In case you need an older rails version use the --version
option
to specify it:
gem install rails --version 5.1.3
Create a demo app using the rails new
command:
rails new demo
Or if you need a specific rails version use this command:
rails _5.1.3_ new demo
cd demo
rails server
Alternatively, you can use the following shortcut, to start the app:
rails s
If you need to change the port or the host use the options -p
and -b
, respectively:
rails s -p 3001 -b 0.0.0.0