Hi, I’m trying to create and configure a new Rails app but I’m getting the following error message after running flyctl launch.
This is a brand new Rails 7 app (with importmap). I’m using flyctl v0.1.33.
Creating app in XXXXXXXXXXX
Scanning source code
Error: Failed to install bundle, exiting: exec: "bundle": cannot run executable found relative to current directory
I tried creating another Rails app (rails new app_name) just now to see if it had anything to do with this app specifically, but I’m getting the same error…
What it is attempting to do is run the command bundle install --quiet, and checking that that returns a 0 status code. If it gets an error, it doesn’t proceed because proceeding would undoubtedly fail.
If flyctl can’t run commands on your behalf, launch won’t get very far.
I’d love to debug this further. If I constructed a minimal go program would you be able to compile and run it? If I were to build a minimal program and compile it for you, what operating system, instruction set would work for you (linux/mac/windows; intel/arm).
Put the following into test.go, and then run go run test.go. You may be able to install go with your favorite package manager, otherwise you can always download it.
Thanks for helping out @rubys - here’s the output.
failure finding bundle executable: exec: "bundle": cannot run executable found relative to current directory
So this means it can’t find the bundle. Indeed, bundle is not located at the root of the app, it’s located at bin/bundle. So I tried running flyctl launch from /bin and it’s working this time. Not sure it will be able to correctly build the app though, I’ll have a go at it.
Yes, that works! Do you want to report the issue or open a PR for that? I’m happy opening an issue but I’m not comfortable with go so I won’t risk opening a PR