Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

murajun1978/docked-with-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

Docked Rails CLI with PostgreSQL

Setting up Rails for the first time with all the dependencies necessary can be daunting for beginners. Docked Rails CLI uses a Docker image to make it much easier, requiring only Docker to be installed.

Install Docker (and WSL on Windows). Then copy'n'paste into your terminal:

docker volume create ruby-bundle-cache
alias docked='docker run --rm -it -v ${PWD}:/rails -u $(id -u):$(id -g) -v ruby-bundle-cache:/bundle -p 3000:3000 ghcr.io/murajun1978/docked-with-postgresql:main'

Then create your Rails app:

docked rails new weblog -d postgresql
cd weblog
docked rails generate scaffold post title:string body:text
docked rails db:migrate
docked rails server

That's it! Your Rails app is running on http://localhost:3000/posts.

Sidenote

docked is not intended to replace a full development setup. It is merely a way for newcomers to quickly get started with Rails. The included dependencies stick to what you need when running rails new without additional options. It does not include dependencies for running with PostgreSQL or Redis for example.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

AltStyle によって変換されたページ (->オリジナル) /