How to make listen gem work with Ruby 3.0.0p0
Asked Answered
P

2

7

I installed Ruby 3.0.0p0 on my Macbook pro (2020 M1) and rails 6.1.3. However, whenever attempting to start up the rails server on my machine, I get the following error:

listen-3.2.1 requires ruby version >= 2.2.7, ~> 2.2, which is incompatible with the current version, ruby 3.0.0p0

Really need to get this up and running. Please help!

Priedieu answered 12/3, 2021 at 22:57 Comment(0)
P
3

You can upgrade the version of listen gem. There are newer versions available: https://rubygems.org/gems/listen/versions/3.1.5

So if there is a version specified in the gem file, remove it and run bundle update listen

You might need to play around a bit with different version, in case bundler doesn't find a version that matches with all other dependiencies of your app.

Providing answered 12/3, 2021 at 23:17 Comment(4)
Ok, I'll try it.Priedieu
If it worked I am happy if you could accedpt my answerProviding
if you're here because of Jekyll, what helped was removing gemfile.lock, brew update && brew upgrade, brew install vips, and as @muya_'s answer suggests, bundle add webrick. Maybe you need to sprinkle some bundle update and/or gem install bundler jekyll here and there.Rodge
It should be bundle update listen Malagasy
P
16

Thanks to this blog post: https://www.chadduffey.com/2021/03/Jekyll-Poop.html

I was able to solve this issue by running:

bundle update

and then to solve the subsequent error (when running the Jekyll server):

bundle add webrick
Phlegmy answered 28/3, 2021 at 11:20 Comment(0)
P
3

You can upgrade the version of listen gem. There are newer versions available: https://rubygems.org/gems/listen/versions/3.1.5

So if there is a version specified in the gem file, remove it and run bundle update listen

You might need to play around a bit with different version, in case bundler doesn't find a version that matches with all other dependiencies of your app.

Providing answered 12/3, 2021 at 23:17 Comment(4)
Ok, I'll try it.Priedieu
If it worked I am happy if you could accedpt my answerProviding
if you're here because of Jekyll, what helped was removing gemfile.lock, brew update && brew upgrade, brew install vips, and as @muya_'s answer suggests, bundle add webrick. Maybe you need to sprinkle some bundle update and/or gem install bundler jekyll here and there.Rodge
It should be bundle update listen Malagasy

© 2022 - 2024 — McMap. All rights reserved.