Ruby failed to rackup - uninitialized constant Dry::Validation::Contract

1.3k Views Asked by At

My laptop is MacOS m1 chip, when I was using rackup to run the app, it showed uninitialized constant Dry::Validation::Contract (NameError) Did you mean? Dry::Container, I have no idea about it and didn't find an answer on the Internet.

Here's my Gemfile.

# frozen_string_literal: true

source 'https://rubygems.org'
ruby '2.7.3'

# PRESENTATION LAYER
gem 'slim'

# APPLICATION LAYER
# Web application related
gem 'econfig'
gem 'puma'
gem 'roda'

# Controllers and services
gem 'dry-monads'
gem 'dry-transaction'
gem 'dry-validation'

...

Also put the Gemfile.lock here

GEM
  remote: https://rubygems.org/
  specs:
    ...
    dry-validation (0.12.2)
      concurrent-ruby (~> 1.0)
      dry-configurable (~> 0.1, >= 0.1.3)
      dry-core (~> 0.2, >= 0.2.1)
      dry-equalizer (~> 0.2)
      dry-logic (~> 0.4, >= 0.4.0)
      dry-types (~> 0.13.1)
    ...

PLATFORMS
  ruby

DEPENDENCIES
  ...
  dry-monads
  dry-transaction
  dry-validation
  ...

RUBY VERSION
   ruby 2.7.3p183

BUNDLED WITH
   2.2.21

Hope someone can help, thanks!

0

There are 0 best solutions below