R
Railway•9mo ago
Sang Dang

How to "login to rail console"?

After install Chatwoot template, I need to do this step: Enable channel_email (Login to rails console and execute the following) https://www.chatwoot.com/docs/self-hosted/configuration/features/email-channel/setup I'm not really expert in Rails, not sure how to do it in Railway, can someone help?
Solution:
you will not need ( i think ) ``` account = Account.find(1) account.enabled_features // This would list enabled features. account.enable_features('channel_email')...
Jump to solution
45 Replies
Percy
Percy•9mo ago
Project ID: 747984b9-6b72-4461-9cc6-317013c8b25b
Sang Dang
Sang Dang•9mo ago
747984b9-6b72-4461-9cc6-317013c8b25b
Sang Dang
Sang Dang•9mo ago
yes, I done that
Muffin
Muffin•9mo ago
you can connect to rails with https://docs.railway.app/develop/cli if i am not wrong. I do the email inbound with sendgrid, so my setup differs from yours. @Brody Railway CLI should perfectly work for rails commands right?
Railway Docs
CLI | Railway Docs
Documentation for Railway
Sang Dang
Sang Dang•9mo ago
I also chose SendGrid 😄
Muffin
Muffin•9mo ago
oh okay
Sang Dang
Sang Dang•9mo ago
I done that too
Muffin
Muffin•9mo ago
you will need to setup the env vars, mx records and as well the url authentication
Brody
Brody•9mo ago
you would need rails installed locally to open up a local rails repl with the service variables available but that doesnt seem relevant anymore?
Sang Dang
Sang Dang•9mo ago
the only step is Enable channel_email (Login to rails console and execute the following)
Solution
Muffin
Muffin•9mo ago
you will not need ( i think )
account = Account.find(1)
account.enabled_features // This would list enabled features.
account.enable_features('channel_email')
account.save!
account = Account.find(1)
account.enabled_features // This would list enabled features.
account.enable_features('channel_email')
account.save!
Muffin
Muffin•9mo ago
its perfectly working if you're enter your email box.
Sang Dang
Sang Dang•9mo ago
ohhh
Muffin
Muffin•9mo ago
i just registered my email at sendgrid and later throw it in chatwoot as my inbox. hello@mydomain.de in this case
Sang Dang
Sang Dang•9mo ago
ok I will continue and let you know
Muffin
Muffin•9mo ago
maybe i dont remember correctly
Sang Dang
Sang Dang•9mo ago
I hope you are correct, look like the Chatwoot enable the channel email by default
No description
Muffin
Muffin•9mo ago
yes exactly just throw it in there maybe brody already enabled it inside the template idk
Brody
Brody•9mo ago
didnt do anything like that
Muffin
Muffin•9mo ago
or its just default now because alot of ppl dont know how to connect to rails like me 😄
Sang Dang
Sang Dang•9mo ago
work like a charm!
No description
Sang Dang
Sang Dang•9mo ago
thank you so much @Muffin @Brody
Muffin
Muffin•9mo ago
send a message back and see if the smtp works also, are you using google in the background?
Sang Dang
Sang Dang•9mo ago
what do you mean google in the background? If you mean using Google Workspace with my root domain, then yes
Muffin
Muffin•9mo ago
okay, if you use gmail, then you should increase the time for sync between chatwoot and gmail. chatwoot sync every 60 seconds from gmail, problem is, gmail has a hard policy and will ban your ip. So increase that 60 seconds to 10 minutes instead.
Brody
Brody•9mo ago
does that apply to business google emails too?
Muffin
Muffin•9mo ago
yes tested it
Brody
Brody•9mo ago
damn thats bad
Muffin
Muffin•9mo ago
yes but not sure how i changed it i think somehow with "another Redis Client" inside the configuration. 5 minutes should also be fine but 10 minutes is bulletproof
Sang Dang
Sang Dang•9mo ago
is the configuration inside Chatwoot?
Muffin
Muffin•9mo ago
its inside the redis client its a cronjob that is running in the background
Sang Dang
Sang Dang•9mo ago
hmmm I dont see anything like interval inside my redis let me take some screenshots
Muffin
Muffin•9mo ago
you can see the connection in the chatwoot server logs the redis client just starts the service every 60 seconds, but the main service is running inside chatwoot thats how i figured out that my ip got banned after 10 request they just blocked the connection lul
Sang Dang
Sang Dang•9mo ago
like this?
No description
Muffin
Muffin•9mo ago
yes if you cant see any timeouts there, than just keep the 60 seconds just want to mention it, because had headache for hours and wondered why emails will not be displayed inside chatwoot
Sang Dang
Sang Dang•9mo ago
I think the reason is because I follow the guideline of using sub domain , support.mydomain.com instead the root so so far google still not block me
Muffin
Muffin•9mo ago
good!
Sang Dang
Sang Dang•9mo ago
but still thanks for mention it sound so scary HAHAHA
Muffin
Muffin•9mo ago
well isnt scary, they wont ban or flag your email address for blacklist, but just makes the debug harder then it should be
Sang Dang
Sang Dang•9mo ago
at least it works now, I just have to choose the email address and domain to forward now
Muffin
Muffin•9mo ago
yeah that should it be to get it running
Sang Dang
Sang Dang•9mo ago
thanks so much
Muffin
Muffin•9mo ago
the chat widget and knowledge base is also a deep dive worth in case you need it