Home > database >  Issue Deploying Rails 6.1 to AWS Elastic Beanstalk
Issue Deploying Rails 6.1 to AWS Elastic Beanstalk

Time:04-27

Any tips on deploying Rails to AWS Elastic Beanstalk ? I am starting to have real difficulty. Each error I solve leads to another one. Right now it has issue with compiling assets warning: shebang line ending with \r may cause problems , so I turned it off for now by changing one environment configuration as : RAILS_SKIP_ASSET_COMPILATION = true Now it is a database issue. I update things but each time it fails to deploy the newer version and keeps the old one running...

CodePudding user response:

Did you check if your line-ending format is either Windows (CRLF or \r\n) or *NIX (LF alone or \n)?

If your source control is git, both options are available. And if you develop on Windows, or if you moved your code between platforms without configuring git config core.autocrlf, your sources files could have both these different formats and that can confuse text interpreters.

Have you checked also if AWS has any recommended Rails version? Often, cloud providers will lag on Ruby and most other languages/frameworks if you are using anything else except a VM.

So Another option is to deploy Rails on a VM (AWS or GCP or Azure or Digital Ocean etc ..) and in this case you will have full control of everything and you can run any version of Rails but it will require a bit more options to open ingress ports and assign static IP addr, fundamentally Virtual Machine initial config.

Reference for git line ending config:

https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

About Windows CRLF:

https://www.hanselman.com/blog/carriage-returns-and-line-feeds-will-ultimately-bite-you-some-git-tips

  • Related