publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
957 stars 1.83k forks source link

Gitpod not working correctly due to bundler version mismatch #9871

Open cesswairimu opened 3 years ago

cesswairimu commented 3 years ago

There are instances where gitpod is not working well. Sushmita and Jeff has experienced this. Not starting automatically, Jeff had to do bundle install possibly intermittent

jywarren commented 3 years ago

Yes, i wonder if this is an ordering issue or timing? We might be able to insert a wait or do something else to tweak the ordering so that it reliably succeeds in completing bundle install so it can continue to set up the dev environment and open a browser preview window. Otherwise it's pretty hard for newcomers to figure out what's going wrong!

jywarren commented 3 years ago

I'm seeing that ruby 2.6.6 wasnt installed but was required by the gemfile, so i had to run rvm use ruby-2.6.6 or something, and then:

gitpod /workspace/plots2 $ bundle install
Traceback (most recent call last):
        4: from /home/gitpod/.rvm/rubies/ruby-2.6.6/bin/ruby_executable_hooks:22:in `<main>'
        3: from /home/gitpod/.rvm/rubies/ruby-2.6.6/bin/ruby_executable_hooks:22:in `eval'
        2: from /home/gitpod/.rvm/rubies/ruby-2.6.6/bin/bundle:23:in `<main>'
        1: from /home/gitpod/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
/home/gitpod/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (2.2.21) required by your /workspace/plots2/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.2.21`

after gem install bundler:2.2.21 the gems installed.

This hiccup may be stopping GitPod from being a smooth experience!

cesswairimu commented 3 years ago

thanks Jeff, attempting this here https://github.com/publiclab/plots2/pull/9897

jywarren commented 2 years ago

also linking to #10134

jywarren commented 2 years ago

Same issue as in https://github.com/publiclab/spectral-workbench/pull/717 !!

jywarren commented 2 years ago

So I think possibly the solution is to update bundler in all our containers to match GitPod's version, so that we can just use the same version for all.

jywarren commented 2 years ago

Ah i'm seeing we are on 2.2.21 in plots2:

https://github.com/publiclab/plots2/blob/6e499b5dee0a2bbfac0ec83e61746db6a8ca93a4/Gemfile.lock#L749

vs 1.17.3 in SWB:

https://github.com/publiclab/spectral-workbench/blob/fb1d30d653cb41d4d68e7b31176f38d7fe59414a/Gemfile.lock#L277-L278

cesswairimu commented 2 years ago

Currently failing on startup withf 2 errors:

  1. Sprockets::FileNotFound in Home#home : running yarn install fixes this and on restarting server, the error displayed next is error 2
  2. Webpacker::Manifest::MissingEntryError in Home#home: running rails webpacker:install solves this: on server restart the browser loads perfect