Add ruby 2.3.1 support to rbenv in ubuntu images


#1

Ruby 2.3.1 got released : https://www.ruby-lang.org/en/news/2016/04/26/ruby-2-3-1-released/

Default rbenv does not list it via rbenv versions

My workaround for now:

#circle.yml
machine:
  ruby:
    version: 2.3.1
  pre:
    - git clone https://github.com/rbenv/ruby-build.git && cd ruby-build && sudo sh install.sh
    - rbenv install 2.3.1
    - rbenv global 2.3.1
    - cd $CIRCLE_PROJECT_REPONAME && gem update --system

#2

When is this going to be fixed? It’s 30 days old. If I don’t use this workaround I get:

bundler: failed to load command: rspec (/home/ubuntu/nifty-website-api/vendor/bundle/ruby/2.3.0/bin/rspec)


#3

Ubuntu 14.04 2.3.1 is pre-installed:

https://circleci.com/docs/build-image-trusty/#ruby


#4

Well, it doesn’t seem like it, this is a log from today:

bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 
ruby-2.3.1 is not installed - installing.
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/12.04/x86_64/ruby-2.3.1.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.3.1 - #configure
ruby-2.3.1 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 23.0M    0  203k    0     0   139k      0  0:02:49  0:00:01  0:02:48  139k 20 23.0M   20 4759k    0     0  1941k      0  0:00:12  0:00:02  0:00:10 4606k 43 23.0M   43  9.8M    0     0  2945k      0  0:00:07  0:00:03  0:00:04 5019k 66 23.0M   66 15.1M    0     0  3510k      0  0:00:06  0:00:04  0:00:02 5170k 88 23.0M   88 20.4M    0     0  3846k      0  0:00:06  0:00:05  0:00:01 5206k100 23.0M  100 23.0M    0     0  4002k      0  0:00:05  0:00:05 --:--:-- 5281k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.3.1 - #validate archive
ruby-2.3.1 - #extract
ruby-2.3.1 - #validate binary
ruby-2.3.1 - #setup
ruby-2.3.1 - #gemset created /home/ubuntu/.rvm/gems/ruby-2.3.1@global
ruby-2.3.1 - #importing gemset /home/ubuntu/.rvm/gemsets/global.gems|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-.
ruby-2.3.1 - #generating global wrappers|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/.
ruby-2.3.1 - #gemset created /home/ubuntu/.rvm/gems/ruby-2.3.1
ruby-2.3.1 - #importing gemsetfile /home/ubuntu/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.1 - #generating default wrappers|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-\|/-.|/-\|/-\|.-\|/-.
The Gemfile's dependencies are satisfied

and then:

bundle exec rspec --color --require spec_helper -f Fuubar spec
bundler: failed to load command: rspec (/home/ubuntu/xxx/vendor/bundle/ruby/2.3.0/bin/rspec)
NoMethodError: undefined method `activate_bin_path' for Gem:Module

So it’s totally broken for me.


#5

Oh I thought you meant it was running on latest Ubuntu by default. Realized I had to switch manually to the new distro. Now it works. Thanks


#6