When deploying on Heroku, the server crashes with this information rails server syntax error File.expand_path("../spring", FILE) though everything is working when working locally. Here is my rail file
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
APP_PATH=File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
Do you have any idea of the issue? Thanks
Found the solution after 1/2 day of struggling You need the following line at the top of the rail file: #!/usr/bin/env ruby Surprisingly, it wasn't a problem locally but when deploying on Heroku it was.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With