Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
the error seems to be thrown when searching for /usr/local/opt/readline/lib/libreadline.7.dylib. Have you tried to symlink that? So something like: Just tried that on macOS Mojave, ruby 2.5.3p105 and Rails 5.2.2 and worked.