How to I access the rails console?


  • Used Zammad version: 3.3.x
  • Zammad installation source: apt-get
  • Operating system: Ubuntu 18.04
  • Browser + version: Latest chrome

Hi guys, I would like to send all outgoing emails to a bcc mailbox. I’m supposed to access the console but I have no experience with Ruby.

I believe I have to run rails then enter the System.set command but I’m having trouble with it.

I ran this:
/usr/bin/env: ‘ruby’: No such file or directory

Can anyone please help me with this?

What if you follow and run


None of these work

zammad run rails r ‘Setting.get(‘system_bcc’}’
zammad run rails r “Setting.get(‘system_bcc’)”
zammad run rails r ‘Setting.get(“system_bcc”)’

But I managed to drop into a shell with

zammad run rails c

Thanks so much for your help!

They do work, but ensure to use ' and " instead of different characters that are technically different. :slight_smile:

Somehow the single command doesn’t work for me even if I use the ’ and " characters. Or maybe there’s some setting that is suppressing the output?

root@vmlinux-ma:~# zammad run rails r “Setting.get(‘system_bcc’)”
root@vmlinux-ma:~# zammad run rails r ‘Setting.get(“system_bcc”)’
root@vmlinux-ma:~# zammad run rails r ‘Setting.get(‘system_bcc’)’
Please specify a valid ruby command or the path of a script to run.
Run ‘bin/rails runner -h’ for help.

undefined local variable or method `system_bcc’ for main:Object
Did you mean? system
root@vmlinux-ma:~# zammad run rails c
Loading production environment (Rails
irb(main):001:0> Setting.get(‘system_bcc’)
=> “
irb(main):002:0> exit

zammad run rails r 'p Setting.get("system_bcc")'

Works just fine. You can’t get any output from a single command if you don’t use p.
As @boosterpetrovich already mentioned. It’s written here:


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