Rails default Dockerfile build failed after added bootstrap gem
Open
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 2k
- Forks
- 437
- Avg merge
- 1h
- Merged PRs (30d)
- 1
Description
- Create new project with importmap by default
rails new test_app
cd ../test_app
./bin/bundle add dartsass-rails
./bin/rails dartsass:install
- Check if build is ok
docker build .
Now let's produce error:
- add bootstrap gem
./bin/bundle add bootstrap --git 'https://github.com/twbs/bootstrap-rubygem' - build it
docker build .
throw error:
=> ERROR [8/8] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile 1.3s
------
> [8/8] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile:
1.256 bin/rails aborted!
1.256 ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
Installing node/etc is not the right solution because the main reason to use importmap is to drop the nodejs dependency. Any ideas on how to solve this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the listed rails new, dartsass:install, bootstrap gem, and docker build commands. Read the default Dockerfile and the assets:precompile failure, then determine why Bootstrap's build requires a JavaScript runtime under importmap. Done means the Docker build and asset precompile succeed without adding Node.js.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, docker, rails, ruby, sass
- Domain
- build-system, devops, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100