-
-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to newer Ruby in Ubuntu 20.04 fails #2630
Comments
OK, I found the issue described here in the wiki: |
There is already gem 'therubyracer', group: :therubyracer , but it was still failing due to a missing JS engine when installing on Ubuntu 20.04
I gave it a shot and installed on a clean Ubuntu 20.04 LTS in docer, here's the tutorial (including the workaround due to missing JS library and updating bundler): |
Sorry for the delay here too. The Ruby versions currently being tested in the CI are 2.5, 2.6 and 2.7, so all of those should work. Apparently, per the link you shared, the issue isn't with Ruby but with Debian/Ubuntu bundled version of Bundler. I think we could document this better and check that there's an actual upstream issue for fixing the issue – on a quick read the Ubuntu issue linked in the wiki page isn't about fixing the real issue. |
Yes, this link ( https://github.com/TracksApp/tracks/wiki/Ubuntu-bundler-broken-due-to-ruby-thor-dependency---explanation-and-workaround ) is not really fixing the issue, it's a non-perfect patch/workaround. But installing the upstream bundler through gem as I described here ( https://github.com/TracksApp/tracks/wiki/Install-Tracks-2.5.1-on-Ubuntu-20.04-LTS-on-AWS-with-SSL-support ) should do the job regardless of the linux distro, right? |
There is already gem 'therubyracer', group: :therubyracer , but it was still failing due to a missing JS engine when installing on Ubuntu 20.04
I couldn't reproduce this doing the following:
Can you try again with the most recent codebase, ie. master? The last release is pretty old so this seems to be maybe already fixed there. |
I'm sorry, still failing to compile even from
|
I didn't run assets:precompile before in the command sequence I suggested, but I retried it and it still works. Can you try the commands I mentioned in my previous comment and let me know if those work? It seems the only meaningful difference is that you install a separate bundler while my version uses the bundler from APT repository. |
So the only difference I see is the package
So it would be nice to disect what are the actual minimal dependencies for Tracks (I suppose it doesn't run on top of |
Anyway, the difference in the installed packages regarding Ruby turned out to be zero. So |
OK, I'm confirming success of the following docker run -it ubuntu:20.04 apt-get update && dist-upgrade -y
apt-get install git-core nano wget ruby ruby-dev build-essential libsqlite3-dev shared-mime-info
cd /srv
git clone https://github.com/TracksApp/tracks.git # master
cd /srv/tracks
bundler2.7 config set --local path 'vendor/bundle'
export RAILS_SERVE_STATIC_FILES=true
bundle config set --local without 'postgresql mysql'
bundle install
cp config/site.yml.tmpl config/site.yml
cp config/database.yml.tmpl config/database.yml
nano config/database.yml # Use the SQLite config instead
bundle2.7 exec rake db:migrate RAILS_ENV=production
bundle2.7 exec rake assets:precompile RAILS_ENV=production Maybe one difference to my installation procedure was that you didn't remove
|
OK, I finally gave it a go on a "real" Ubuntu 20.04 LTS (not clean docker), and after fiddling around with sassc installation (which eventually worked), the upgrade failed on migrating the database, namely
when I copied the sqldb from 2.5.1 to 2.5.2 and ran the db:migrate command. I don't know ruby but the whole ruby ecosystem looks like a big mess. Maybe finally time to say Tracks good bye for good :/ |
The error you're getting sounds quite familiar, but I can't remember right away why it's happening. I think it's a version mismatch, so I wonder if you have the correct versions of the packages available. The easiest way by far is by running it on Docker, that way you get a ready-to-use image instead of having to install all of the stuff yourself. Is there a particular reason you're not going that way? |
The extra layer of Docker on AWS micro instance looked like an overkill to me (it definitely eats some resources) - I'd be running dockerized Ubuntu 18.04 (or 20.04, if I get this nasty error fixed) in AWS Ubuntu 20.04, makes little sense to me. |
After some further hacking, I was finally able to get it work on Ubuntu 20.04 LTS on AWS... So here's a quick summary:
It installs
|
I've been running Tracks on Ubuntu 18.04 LTS for a long time but now I have to upgrage do 20.04. It definitely comes with new Ruby versions (but I'm not a Ruby guy), which breaks Tracks.
The first issue was some missing javascript runtime, so I've added
to the Gemfile. After installing all gems, I get the following error when starting Tracks:
What version of Ruby and other dependencies is required? Anyone installed Tracks succesfully from scratch on Ubuntu 20.04?
Update:
The text was updated successfully, but these errors were encountered: