Many Rails apps have "issues" when building these apps on macOS because of the way macOS "protects" parts of the file system. People send hours, days and weeks trying to get Rails applications to work on macOS because of these permission issues.
However, you can solve this easily, with a simple trick. Create a new command, as follows:
$ cat binstall
bundle install --path vendor/bundle
$ ls -l binstall
-rwxr-xr-x 1 Tim wheel 36 Mar 9 09:47 binstall
This is so simple, but it works perfectly.
Now, instead of bundle install
failing repeatedly, all the gems are saved locally and this bypasses all the permission issues with the macOS system files.
All the frustration of building complex
apps like Discourse on macOS now fade way to a very simple and "happy camper" life with one simple trick.