Search code examples
ruby-on-railsrubylisten

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!


Solution

  • 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.