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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠