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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南