Rails app deployment fails, ruby version in Gemfile read from .ruby-version

My app uses the reasonably common practice of reading the ruby version that is specified in the Gemfile from the .ruby-version file. However, when I try to deploy my app I get an error stating that the .ruby-version file does not exist.
#13 0.745 [!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - .ruby-version. Bundler cannot continue.
#13 0.745
#13 0.745 # from /app/Gemfile:4
#13 0.745 # -------------------------------------------
#13 0.745 #
#13 0.745 > ruby File.read(".ruby-version").strip
#13 0.745 #
#13 0.745 # -------------------------------------------
#13 0.745 [!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - .ruby-version. Bundler cannot continue.
#13 0.745
#13 0.745 # from /app/Gemfile:4
#13 0.745 # -------------------------------------------
#13 0.745 #
#13 0.745 > ruby File.read(".ruby-version").strip
#13 0.745 #
#13 0.745 # -------------------------------------------
5 Replies
Percy
Percy2y ago
Project ID: 0fff58e7-4bf8-4141-9324-7ed371ee7803
coffeejunk.
coffeejunk.OP17mo ago
0fff58e7-4bf8-4141-9324-7ed371ee7803 Does anyone know a way to fix this? I can't find anything in the documentation for this.
Brody
Brody17mo ago
create a .ruby-version file?
coffeejunk.
coffeejunk.OP17mo ago
The file exists For comparison, the app deploys without issue on Heroku.
.scapino
.scapino17mo ago
I wonder if the .ruby-version file is not being sent to Railway's builder. Could it be in an 'ignore' file somewhere? Like .gitignore or similar?
Want results from more Discord servers?
Add your server