Skip to content

Commit cf68ea2

Browse files
none: try installing a particular ruby version
1 parent 1a39885 commit cf68ea2

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.circleci/config.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ jobs:
5050
- checkout
5151
- attach_project
5252

53-
# Use Ruby version from .ruby-version file
54-
- run:
55-
name: Set Ruby Version
56-
command: |
57-
RUBY_VERSION=$(cat .ruby-version)
58-
rvm install $RUBY_VERSION
59-
rvm use $RUBY_VERSION
60-
gem install bundler
61-
6253
- run:
6354
name: Install dependencies
6455
command: |
@@ -171,6 +162,18 @@ jobs:
171162
- attach_workspace:
172163
at: ~/project
173164

165+
- run:
166+
name: Install Ruby version
167+
command: |
168+
brew install rbenv ruby-build
169+
RUBY_VERSION=$(cat .ruby-version)
170+
171+
rbenv install -s $RUBY_VERSION
172+
rbenv global $RUBY_VERSION
173+
rbenv rehash
174+
175+
gem install bundler
176+
174177
- <<: *setup_env_file
175178

176179
- run:
@@ -184,7 +187,10 @@ jobs:
184187
- run:
185188
working_directory: example/ios
186189
name: Install Pods
187-
command: pod install
190+
command: |
191+
# Ensure we're using the correct Ruby version
192+
eval "$(rbenv init -)"
193+
pod install
188194
- save_cache:
189195
key: pod-dependencies-{{ checksum "~/project/example/ios/Podfile" }}
190196
paths:

0 commit comments

Comments
 (0)