Skip to content

try to run it and have got uninitialized constant ApplicationRecord (NameError) #2

Open

Description

@comcava

ruby students_details_server.rb
DEPRECATION WARNING: PaperTrail.config.track_associations has not been set. As of PaperTrail 5, it defaults to false. Tracking associations is an experimental feature so we recommend setting PaperTrail.config.track_associations = false in your config/initializers/paper_trail.rb (called from require at /Users/dan/.rvm/rubies/ruby-2.4.3/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
/Users/dan/work/grpc_with_ruby/app/models/student.rb:1:in <top (required)>': uninitialized constant ApplicationRecord (NameError) from /Users/dan/work/grpc_with_ruby/app/models.rb:9:in block in <top (required)>'
from /Users/dan/work/grpc_with_ruby/app/models.rb:8:in each' from /Users/dan/work/grpc_with_ruby/app/models.rb:8:in <top (required)>'
from /Users/dan/work/grpc_with_ruby/app.rb:2:in block in <top (required)>' from /Users/dan/work/grpc_with_ruby/app.rb:1:in each'
from /Users/dan/work/grpc_with_ruby/app.rb:1:in <top (required)>' from /Users/dan/work/grpc_with_ruby/lib/students_details_service.rb:10:in <top (required)>'
from students_details_server.rb:3:in require' from students_details_server.rb:3:in

'

Activity

  1. comcava commented on Apr 15, 2020

    @comcava
    Author

    But actuall I have in app/models

    frozen_string_literal: true

    class ApplicationRecord < ActiveRecord::Base
    self.abstract_class = true

    has_paper_trail
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions