-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import all task fails on rails 6 #971
Comments
well, it's the import task that is failing: $ bundle exec rails elasticsearch:import:model CLASS="Project"
rails aborted!
NameError: uninitialized constant Project
(eval):1:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-6.0.3.4/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-6.0.3.4/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-6.0.3.4/lib/rails/command.rb:48:in `invoke'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => elasticsearch:import:model
(See full trace by running task with --trace) |
Have you guys tried |
@dbarrionuevo you mean |
No, I mean exactly like this, with the word environment: |
That's not valid syntax. Normally what |
Hello! I just created a small rails 6.0+ app and when I try to run the
import:all
task, it fails because it's not initializing the classes, apparently. Any ideas on how to solve it ?The model structure is this:
app/models/project.rb
app/models/concerns/elastic_config.rb
The text was updated successfully, but these errors were encountered: