Hi, I need to set a specific version of ruby (2.3.1) to run my lanes. I tried using rvm but I failed. Do you have any guide on how I can Install and set 2.3.1?
We don’t have any ruby version manager pre-installed.
Why do you need exactly 2.3.1? Our Xcode 8.x build VMs have either 2.3.1 or 2.3.3 preinstalled right now
Xcode 8.0 stack is on 2.3.1 - https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-8.0.x.log#L16
Xcode 8.3 stack is on 2.3.3 - https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-8.3.x.log#L16
I need to setup that version of ruby because is the version set in our Gemfile.
We CI setup that works with that
I want to test bitrise without affect the existing configurations
The reason why we don’t have RVM, chruby or another ruby version manager preinstalled is because Xcode (Xcode’s command line tools) did have issues in the past when ruby was installed through RVM (see e.g. http://stackoverflow.com/a/33041110/974381 ) or any other ruby version manager.
Additionally, Ruby patch releases should be compatible, so Ruby 2.3.3 should work where 2.3.1 did (and in general patch releases do include important security/stability fixes).
You’re of course free to install and use any Ruby version manager ( http://devcenter.bitrise.io/tips-and-tricks/install-additional-tools/ ).
I’m just curious, which ruby version manager do you use on your Mac @lucabartoletti ?
Probably the fastest solution to switch between Ruby versions on macOS right now is to use
Homebrew recently started to provide versioned minor Ruby versions.
They are still working out the details of their versioning, right now it looks like this:
#!/bin/bash set -ex # uninstall the previously installed ruby version brew uninstall ruby # install the minor version you want brew install firstname.lastname@example.org # "activate" this version brew link --force email@example.com
Unfortunately there’s no way to specify a patch level/version too, only the major+minor versions, and brew will install the latest patch version for that major+minor version, but this shouldn’t cause issues in general.
Any updates on how to use firstname.lastname@example.org on Bitrise? My application uses email@example.com and I can’t make it work. It seems the previous options for the stack with Xcode no longer have firstname.lastname@example.org pre-installed. I also tried installing a new ruby version, but I can’t make bundler work. I’m using this stack: https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-8.3.x.log
brew uninstall ruby brew install email@example.com brew link --force --overwrite firstname.lastname@example.org gem install bundler bundle install
Then I get the following
/bin/sh: /usr/local/bin/bundle: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
Could you send us the URL of the build that failed, so we can have a look at the logs?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.