简体   繁体   中英

How to make listen gem work with Ruby 3.0.0p0

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!

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

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 upgrade listen or just run bundle upgrade 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM