# foreman

Published articles for foreman.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Running Multiple Rails Apps Concurrently with Foreman and Procfile.dev

DevFeed: [Running Multiple Rails Apps Concurrently with Foreman and Procfile.dev](<https://devfeed.tech/articles/running-multiple-rails-apps-concurrently-with-foreman-and-procfile-dev-28290.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rails/2022/07/18/running-multiple-rails-apps-concurrently-with-foreman-and-procfile-dev.html>)

Author: Fuzzygroup

Published: 2022-07-18T13:15:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Environment Variables](<https://devfeed.tech/topics/environment-variables.md>), [Development](<https://devfeed.tech/topics/development.md>), [Yarn](<https://devfeed.tech/topics/yarn.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Unix](<https://devfeed.tech/topics/unix.md>)

Tags: [dev](<https://devfeed.tech/tags/dev.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [foreman](<https://devfeed.tech/tags/foreman.md>), [node](<https://devfeed.tech/tags/node.md>), [port](<https://devfeed.tech/tags/port.md>), [process](<https://devfeed.tech/tags/process.md>), [procfile](<https://devfeed.tech/tags/procfile.md>), [rails](<https://devfeed.tech/tags/rails.md>), [run](<https://devfeed.tech/tags/run.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

A tutorial on running multiple Rails applications concurrently with Foreman and Procfile.dev. It explains how port conflicts can come from Node running behind Yarn and recommends assigning Yarn a port so Node inherits it through the environment.

### Source excerpt

Pizza courtesy of Pizza for Ukraine! Donate Now to Pizza for Ukraine As I've said, I build a lot of side projects and I really, really like the model of having: ALL MY APPS RUNNING CONCURRENTLY I may be a scattered, distracted developer trying to do too damn much but that's my damn right. And I have 64 gigs of RAM so why shouldn't I be this way. What I want is to be able to switch from app to app and make changes. This is important because some apps provide APIs which other apps rely on and having to figure out what thing is on what port, etc, is just plain distracting. Foreman and Procfile.dev is a way around this but there's a major hitch in your getalong (as my Texas wife might say). Here's a sample Procfile.dev for an app I'm building called Cartazzi which makes a developer's life easier: web: bin/rails server -p 5000 css: yarn build:css --watch js: yarn build --reload # docker: docker-compose up And here's a Profile.dev for another application called Poolwizard which helps you maintain your swimming pool: #web: bin/rails server -p $PORT web: bin/rails server -p 5700 css: yarn build:css --watch js: yarn build --reload # docker: docker-compose up worker: bundle exec sidekiq If you run Cartazzi and Poolwizard together then you're going to get crashes and here's the error: ❯ foreman start -f Procfile.dev 09:11:53 web.1 | started with pid 72877 09:11:53 css.1 | started with pid 72878 09:11:53 js.1 | started with pid 72879 09:11:53 worker.1 | started with pid 72881 09:11:53 js.1 | yarn run v1.22.5 09:11:53 css.1 | yarn run v1.22.5 09:11:53 css.1 | $ tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --watch 09:11:53 js.1 | $ node esbuild.config.js --reload 09:11:54 js.1 | node:events:371 09:11:54 js.1 | throw er; // Unhandled 'error' event 09:11:54 js.1 | ^ 09:11:54 js.1 | 09:11:54 js.1 | Error: listen EADDRINUSE: address already in use :::5200 09:11:54 js.1 | at Server.setupListenHandle [as _listen2] (no

## Rails 6 - Can't Find Application.js

DevFeed: [Rails 6 - Can't Find Application.js](<https://devfeed.tech/articles/rails-6-can-t-find-application-js-28273.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rails/2021/12/18/rails-6-can-t-find-application-js.html>)

Author: Fuzzygroup

Published: 2021-12-18T14:51:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Yarn](<https://devfeed.tech/topics/yarn.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [asset-pipeline](<https://devfeed.tech/tags/asset-pipeline.md>), [bash](<https://devfeed.tech/tags/bash.md>), [command](<https://devfeed.tech/tags/command.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [foreman](<https://devfeed.tech/tags/foreman.md>), [git](<https://devfeed.tech/tags/git.md>), [js](<https://devfeed.tech/tags/js.md>), [rails](<https://devfeed.tech/tags/rails.md>), [rake](<https://devfeed.tech/tags/rake.md>)

### AI overview

A troubleshooting note about a Rails 6 project where Webpacker cannot find application.js. It explains installing Webpacker and using bin/dev with Foreman so the JavaScript and CSS asset processes run.

### Source excerpt

So I started fiddling about with a new Rails project and after finding a likely starting point, I immediately ended up with this: Webpacker can't find application.js in I'm old school Rails and I find the whole asset compilation situation, honestly, perplexing. The solution turned out to be: bundle exec rails webpacker:install after the normal: git clone foo bundle install bundle exec rake db:migrate I have no idea why the bundler install doesn't handle executing webpacker:install but cie la vie. The more things change, the more they stay the same ... Update: I kept at this and kept finding that I didn't have webpacker or some other portion of the rails stack running. I finally traced this down to things having changed. Traditionally I've always run rails as: bundle exec rails s -pXYZ And the new approach is to run: bin/dev which in turn contains: #!/usr/bin/env bash if ! command -v foreman &> /dev/null then echo "Installing foreman..." gem install foreman fi foreman start -f Procfile.dev "$@" and the Procfile.dev file contains: web: bin/rails server -p 3000 js: yarn build --watch css: yarn build:css --watch I was literally missing the yarn command so part of the overall asset pipeline just wasn't running. Old habits die hard.