Ruby version mismatch while deploying Rails App with CodeDeploy and CodePipeline Scripts on Ubuntu 20.0 EC2

0

So my Rails Application is running on Ruby2.5.7 and Rails 5.1.5. I have added appspec.yml which include multiple scripts to setup my app like

  1. Setting up ENV variables
  2. Installing Gems
  3. Migrations
  4. Assets Compile etc.

I have also installed rbenv and installed ruby 2.5.7 on instance but every time i trigger deploy the code deploy agent is using ruby 2.7 and trying to install gems on that version which is raising error Your Ruby version is 2.7.0, but your Gemfile specified 2.5.7. My Gemfile specifies 2.5.7 and .ruby-version is also present. I tried to switch the ruby version in myscript but nothing is working.

已提问 2 年前159 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则