B
B
Bestq2016-10-04 12:22:00
Ruby on Rails
Bestq, 2016-10-04 12:22:00

What is the problem with "uninitialized constant"?

Good afternoon.
I updated the system, downloaded the project from Git and try to run it in the development environment.
When running migrations for the development environment, it gives an error

NameError: uninitialized constant
to one of the old migrations, the run is terminated.
The project is written in Ruby 2.2.2 Rails 4.2.0
The project is working and has been in production for a long time.
Tell me what could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Chronic 86, 2016-10-04
@chronic86

Look closely at the name of the models. Well, or show the code at least. The error is probably somewhere more specific than in your question.

A
Artem Gladyshev, 2016-10-17
@fairoj

Most likely, a model is called in the migration that was later deleted. On production, everything happened sequentially, first they ran the migrations, so they deleted the model. When passing migrations from scratch, a problem got out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question