Rails console returning no data

Infos:

  • Used Zammad version: 6.0.0
  • Used Zammad installation type: Docker Compose
  • Operating system: Windows 10
  • Browser + version: N/A

Expected behavior:

  • The rails console to return data when running, for example, Ticket.all, User.all, User.find(3)

Actual behavior:

  • nil or [] returned

Steps to reproduce the behavior:

root@ip-10-0-10-30:/home/ubuntu/zammad-composer# docker container exec -it zammad-composer-zammad-railsserver-1 bash
zammad@10ab5ac5d9ef:~$ rails c
I, [2023-07-25T10:19:35.716406 #85]  INFO -- : ActionCable is using the redis instance at redis://zammad-redis:6379.
I, [2023-07-25T10:19:35.761576#85-5400]  INFO -- : Using memcached as Rails cache store.
I, [2023-07-25T10:19:35.761842#85-5400]  INFO -- : Using the Redis back end for Zammad's web socket session store.
Loading production environment (Rails 6.1.7.4)
irb(main):001:0> Ticket.all
=> []
irb(main):002:0> User.all
=> []
irb(main):003:0> User.all()
=> []
irb(main):004:0> User.find(3)
/usr/local/bundle/gems/composite_primary_keys-13.0.7/lib/composite_primary_keys/core.rb:43:in find: Couldn't find User with 'id'=3 (ActiveRecord::RecordNotFound)
irb(main):005:0> User.find_by(email:"test.account@redacted.com")
=> nil
irb(main):006:0> Ticket.all
=> []
irb(main):007:0>

Hi @Ian, please see here: V6.0.0 Zammad-rails return empty values - #15

Amazing, thank you, the workaround worked perfectly

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.