Bug #34715
closedDB fresh install: ERROR: relation "permissions" does not exist
Added by Tristan Robert almost 3 years ago. Updated about 2 years ago.
Description
fresh install from source (in order to hack). New empty postgresql database.
bundle exec bin/rake db:migrate:
active_record/connection_adapters/postgresql/database_statements.rb:65:in `exec': PG::UndefinedTable: ERROR: relation "permissions" does not exist
LINE 8: WHERE a.attrelid = '"permissions"'::regclass
Updated by Tristan Robert almost 3 years ago
Invalid SQL statement:
SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"permissions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum;
Updated by Ondřej Ezr over 2 years ago
Hi Tristan, would you have a full backtrace where this gets called from? Few days ago I've started a new foreman dev setup just fine, so it might be some of your plugins, or some special setting and full backtrace would be helpful for the debugging.
Updated by Tristan Robert about 2 years ago
bundle exec bin/rake db:create
2022-11-18T15:00:30 [I|app|] Rails cache backend: File
2022-11-18T15:00:30 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2022-11-18T15:00:30 [W|app|] DEPRECATION WARNING: You are using a deprecated behavior, it will be removed in version 3.3, initial value of setting 'instance_id' should be created in a migration (called from block in load_definitions at /home/tristanrobert/repositories/github.com/theforeman/foreman/app/services/setting_registry.rb:131)
2022-11-18T15:00:30 [D|app|] Slow initializers:
2022-11-18T15:00:30 [D|app|] 103.59 ./config/initializers/foreman.rb
2022-11-18T15:00:30 [D|app|] 155.53 ./config/initializers/foreman_register.rb
/home/tristanrobert/repositories/github.com/theforeman/foreman/lib/net/validations.rb:12: warning: already initialized constant Net::Validations::HOST_REGEXP_ERR_MSG
/home/tristanrobert/repositories/github.com/theforeman/foreman/lib/net/validations.rb:12: warning: previous definition of HOST_REGEXP_ERR_MSG was here
2022-11-18T15:00:31 [D|app|] Registering 7 assets for plugin foreman_fog_proxmox precompilation
2022-11-18T15:00:31 [W|app|] DEPRECATION WARNING: Initialization autoloaded the constants Net::Validations, SettingRegistry, HiddenValue, SettingPresenter, Foreman::Deprecation, SettingSelectCollection, MediumProviders, MediumProviders::Provider, MediumProviders::Default, Foreman::TelemetryHelper, EncryptValue, PermissionName, UrlSchemaValidator, RegexpValidator, ArrayTypeValidator, ArrayHostnamesIpsValidator, EmailValidator, Setting, DirtyAssociations, Taxonomix, Encryptable, Authorizable, EnsureNotUsedBy, ComputeResource, ProxmoxVmInterfacesHelper, ProxmoxVmCdromHelper, ProxmoxVmCloudinitHelper, ProxmoxVmVolumesHelper, ProxmoxVmConfigHelper, ProxmoxVmOsTemplateHelper, ProxmoxVmHelper, ForemanFogProxmox::ProxmoxConnection, ForemanFogProxmox::ProxmoxVmNew, ForemanFogProxmox::ProxmoxVolumes, ForemanFogProxmox::ProxmoxPools, ForemanFogProxmox::ProxmoxVmCommands, ProxmoxVmUuidHelper, ForemanFogProxmox::ProxmoxVmQueries, ForemanFogProxmox::ProxmoxComputeAttributes, ForemanFogProxmox::ProxmoxInterfaces, ForemanFogProxmox::ProxmoxImages, ForemanFogProxmox::ProxmoxOperatingSystems, ForemanFogProxmox::ProxmoxVersion, ForemanFogProxmox::ProxmoxConsole, and ForemanFogProxmox::Proxmox.
|
| Being able to do this is deprecated. Autoloading during initialization is going
| to be an error condition in future versions of Rails.
|
| Reloading does not reboot the application, and therefore code executed during
| initialization does not run again. So, if you reload Net::Validations, for example,
| the expected changes won't be reflected in that stale Module object.
|
| `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
|
| In order to autoload safely at boot time, please wrap your code in a reloader
| callback this way:
|
| Rails.application.reloader.to_prepare do
| # Autoload classes and modules needed at boot time here.
| end
|
| That block runs when the application boots, and every time there is a reload.
| For historical reasons, it may run twice, so it has to be idempotent.
|
| Check the "Autoloading and Reloading Constants" guide to learn more about how
| Rails autoloads and reloads.
| (called from block in run at /home/tristanrobert/repositories/github.com/theforeman/foreman/config/initializers/0_print_time_spent.rb:45)
2022-11-18T15:00:32 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2022-11-18T15:00:32 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
/home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `exec': PG::UndefinedTable: ERROR: relation "permissions" does not exist
LINE 8: WHERE a.attrelid = '"permissions"'::regclass
^
(ActiveRecord::StatementInvalid)
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `block (2 levels) in query'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:18:in `block in query'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:17:in `query'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in `column_definitions'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/schema_statements.rb:116:in `columns'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:112:in `block in columns'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:111:in `fetch'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:111:in `columns'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:120:in `block in columns_hash'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:119:in `fetch'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/schema_cache.rb:119:in `columns_hash'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:553:in `load_schema!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/attributes.rb:250:in `load_schema!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:539:in `block in load_schema'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:536:in `synchronize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:536:in `load_schema'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:392:in `columns_hash'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:1313:in `arel_column'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:1437:in `order_column'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:1406:in `block in preprocess_order_args'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:1403:in `map!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:1403:in `preprocess_order_args'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:360:in `order!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activerecord-6.1.7/lib/active_record/relation/query_methods.rb:355:in `order'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/models/permission.rb:15:in `resources'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/controllers/api/v2/template_inputs_controller.rb:40:in `block (2 levels) in <class:TemplateInputsController>'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:326:in `instance_exec'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:326:in `initialize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:319:in `new'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:319:in `build'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:34:in `block in find'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:33:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/validator.rb:33:in `find'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/param_description.rb:93:in `initialize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/param_description.rb:21:in `new'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/param_description.rb:21:in `from_dsl_data'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/method_description.rb:55:in `block in initialize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/method_description.rb:54:in `map'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/method_description.rb:54:in `initialize'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/application.rb:93:in `new'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/application.rb:93:in `block in define_method_description'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/application.rb:85:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/application.rb:85:in `define_method_description'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/apipie_module.rb:34:in `method_missing'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/apipie-rails-0.8.2/lib/apipie/dsl_definition.rb:554:in `method_added'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/controllers/api/v2/template_inputs_controller.rb:47:in `<class:TemplateInputsController>'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/controllers/api/v2/template_inputs_controller.rb:3:in `<module:V2>'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/controllers/api/v2/template_inputs_controller.rb:2:in `<module:Api>'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/app/controllers/api/v2/template_inputs_controller.rb:1:in `<main>'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:523:in `load'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:523:in `block in load_file'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:715:in `new_constants_in'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:522:in `load_file'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:419:in `block in require_or_load'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:39:in `block in load_interlock'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:13:in `loading'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:39:in `load_interlock'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:402:in `require_or_load'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:375:in `depend_on'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:288:in `require_dependency'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:493:in `block (2 levels) in eager_load!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:492:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:492:in `block in eager_load!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:489:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:489:in `eager_load!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/application.rb:519:in `eager_load!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/engine.rb:358:in `eager_load!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/application/finisher.rb:134:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/application/finisher.rb:134:in `block in <module:Finisher>'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `instance_exec'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `run'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/config/initializers/0_print_time_spent.rb:45:in `block in run'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/config/initializers/0_print_time_spent.rb:17:in `benchmark'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/config/initializers/0_print_time_spent.rb:45:in `run'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `call'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/initializable.rb:60:in `run_initializers'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/application.rb:391:in `initialize!'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/railtie.rb:207:in `public_send'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.7/lib/rails/railtie.rb:207:in `method_missing'
from /home/tristanrobert/repositories/github.com/theforeman/foreman/config/environment.rb:5:in `<main>'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:106:in `preload'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
from /home/tristanrobert/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
from -e:1:in `<main>'
Updated by Tristan Robert about 2 years ago
- Status changed from New to Resolved
I have found a solution: I need to set RAILS_ENV=production, for example:
RAILS_ENV=production bundle exec bin/rake db:create