grpc gem fails on Ubuntu and can't revert to older version

I was trying to upgrade GitLab CE to 9.0 on Ubuntu 14.04 but than I ran into an error similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/29562 when executing sudo -u git -H bundle install --without postgres development test --deployment.

[C]       Compiling src/core/lib/iomgr/network_status_tracker.c
[C]       Compiling src/core/lib/iomgr/polling_entity.c
cc1: all warnings being treated as errors
make: ***
[/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/ext/grpc/objs/opt/third_party/zlib/inflate.o]
Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/local/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2 for
inspection.
Results logged to
/home/git/gitlab/vendor/bundle/ruby/2.3.0/extensions/x86-linux/2.3.0-static/grpc-1.1.2/gem_make.out

An error occurred while installing grpc (1.1.2), and Bundler cannot continue.
Make sure that `gem install grpc -v '1.1.2'` succeeds before bundling.

So I tried switched back to 8.17 using the update guide at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/8.16-to-8.17.md but now I am getting this error when running sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production:

rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'coffee-rails'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/execjs-2.6.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/execjs-2.6.0/lib/execjs.rb:4:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'

What can I do to get my version working again?

Assignee Loading
Time tracking Loading