Webpacker Manifest Error solved using Docker in M1 chip

Somin
2 min readJan 17, 2023

I spent an entire week setting up ruby development on my M1 MacBook Pro. I encountered several issues, including problems with the bundle installation and Gemfile, as well as difficulty installing certain gems like grpc , pg gem , and eventmachine . Eventually, I switched to docker for setting up the development environment, but even then I ran into issues with web-pack. Throughout the process, I used various resources such as Stack Overflow, Medium articles, GitHub Gist, and more to troubleshoot and solve the issues.

In this article, I will share my experience and explain what steps I took to set up a ruby project on an M1 MacBook Pro. Due to the ARM64 architecture of the M1 chip, there are additional considerations to consider when installing dependencies. In some cases, it may be necessary to tweak the platform architecture to force the installation of certain gems and dependencies. However, using docker can help effectively manage errors and make the setup process smoother.

Setting up a ruby project using docker:

  1. Clone the project
  2. Follow the instructions in the reference article: https://semaphoreci.com/community/tutorials/dockerizing-a-ruby-on-rails-application
  3. Run the command: “docker-compose up”
  • This command will build all the containers of the project, install all the dependencies, and start the containers.

If you encounter a problem with the web-pack connection while the docker is up and running, the issue can be resolved by following these steps:

  1. Run the command: docker-compose up (again) # this starts the docker

If you encounter a web-pack error, proceed to step 3

Open a new terminal (cmd+t)

  1. docker ps # this lists all the running containers (ex: main-server, web-pack, redis, Postgres)
  2. docker exec -it <id of main-server> sh # this opens a shell within the main terminal
  3. yarn start # this builds the web-pack connection with the docker main-server
  4. localhost:3000 # for the project up and running 🚀

--

--

Somin

Open to talk on world economics, geopolitics, culture, education, and slowly learning to be a good software engineer :)