You can easily create Rails 6.0 templates using docker-compose. It uses PostgreSQL for the database and webpacker on the front end, so modern development using ES 6 is possible.
Please install Docker on your PC first. Refer to here for the installation procedure.
If you are a Linux user you need to install docker-compose with this operations.
Then clone the repository and move to project folder.
Plese set your project name like sample_app
.
git clone -b rails6 https://github.com/naokikubo2/quickstart.git <Project name>
cd <Project name>
It may be easier to fork. In that case, please change the repository name from Settings -> Rename after fork.
Only you need to execute setup shell.
./qs setup
This templates use webpacker, postgresql and don't use minitest.
You can use the options available with rails new
commands.
./qs setup -T --webpack=react
You may get a lot of warnings about [~ because its extensions are not built. Try ~].You can ignore Those warnings.
But if this warnings annoys you, Please execute the command displayed in the warning or execute ./qs bundle exec gem pristine --all
.
Finally, please access http://localhost:3000
as Rails is running.
Enjoy your Rails!
You can use also those services!
Execute ./qs up spring
command.
And you can execute some command like ./qs spring rails c
, ./qs spring rails db:migrate
.
If you use solargraph container at first time, Please Add gem 'solargraph', group: :development
to Gemfile, And execute ./qs bundle install
command.
Execute ./qs up solargraph
command.
Now, You can use solargraph server.
Execute ./qs up redis
command.
Execute ./qs up chrome
command.
you can use byebug.