Home > Net >  Deploying Ruby on Rails apps to Railway
Deploying Ruby on Rails apps to Railway

Time:01-16

I hope you are all well!

For several days now I have been trying to deploy a simple rails app to Railway.app, and failing catastrophically and repeatedly to get it to run.

Here is the github repo:

https://github.com/CaffieneSage/blogApp-rails-

The error I am getting is during the deploy step specifically:

bundler: not executable: bin/rails

I have successfully deployed apps to heroku in the past. I suspect there is something simple that I am missing. I have tried rerolling and deploying the default rails app to simplify things. I have made sure to us postgres instead of SQLite3 as the db. I have spun up an instance of postgres on railway and tried to set my environment variables to point to it. I have had a go within the CLI as well.

Thanks in advance for any advice you may have to offer!

This is my first post on stack overflow, please go easy on me ;]

CodePudding user response:

The issue likely stems from the script bin/rails not having the executable bit on the file.

You can see the file permissions using ls:

ls -l bin/

All of the files will display:

-rw-r—r—

These need to have the executable bit set, so you can run something like:

chmod  x bin/*

After which all the files should have this permission set:

-rwxr-xr-x

Don’t forget to commit the changes.

Read more on file permissions: https://en.wikipedia.org/wiki/File-system_permissions

  • Related