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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ