R
Railway•14mo 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•14mo ago
Project ID: 747984b9-6b72-4461-9cc6-317013c8b25b
Sang Dang
Sang DangOP•14mo ago
747984b9-6b72-4461-9cc6-317013c8b25b
Sang Dang
Sang DangOP•14mo ago
yes, I done that
Baldbytes
Baldbytes•14mo 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 DangOP•14mo ago
I also chose SendGrid 😄
Baldbytes
Baldbytes•14mo ago
oh okay
Sang Dang
Sang DangOP•14mo ago
I done that too
Baldbytes
Baldbytes•14mo ago
you will need to setup the env vars, mx records and as well the url authentication
Brody
Brody•14mo 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 DangOP•14mo ago
the only step is Enable channel_email (Login to rails console and execute the following)
Solution
Baldbytes
Baldbytes•14mo 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!
Baldbytes
Baldbytes•14mo ago
its perfectly working if you're enter your email box.
Sang Dang
Sang DangOP•14mo ago
ohhh
Baldbytes
Baldbytes•14mo ago
i just registered my email at sendgrid and later throw it in chatwoot as my inbox. [email protected] in this case
Sang Dang
Sang DangOP•14mo ago
ok I will continue and let you know
Baldbytes
Baldbytes•14mo ago
maybe i dont remember correctly
Sang Dang
Sang DangOP•14mo ago
I hope you are correct, look like the Chatwoot enable the channel email by default
No description
Baldbytes
Baldbytes•14mo ago
yes exactly just throw it in there maybe brody already enabled it inside the template idk
Brody
Brody•14mo ago
didnt do anything like that
Baldbytes
Baldbytes•14mo ago
or its just default now because alot of ppl dont know how to connect to rails like me 😄
Sang Dang
Sang DangOP•14mo ago
work like a charm!
No description
Sang Dang
Sang DangOP•14mo ago
thank you so much @Muffin @Brody
Baldbytes
Baldbytes•14mo ago
send a message back and see if the smtp works also, are you using google in the background?
Sang Dang
Sang DangOP•14mo ago
what do you mean google in the background? If you mean using Google Workspace with my root domain, then yes
Baldbytes
Baldbytes•14mo 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•14mo ago
does that apply to business google emails too?
Baldbytes
Baldbytes•14mo ago
yes tested it
Brody
Brody•14mo ago
damn thats bad
Baldbytes
Baldbytes•14mo 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 DangOP•14mo ago
is the configuration inside Chatwoot?
Baldbytes
Baldbytes•14mo ago
its inside the redis client its a cronjob that is running in the background
Sang Dang
Sang DangOP•14mo ago
hmmm I dont see anything like interval inside my redis let me take some screenshots
Baldbytes
Baldbytes•14mo 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 DangOP•14mo ago
like this?
No description
Baldbytes
Baldbytes•14mo 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 DangOP•14mo 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
Baldbytes
Baldbytes•14mo ago
good!
Sang Dang
Sang DangOP•14mo ago
but still thanks for mention it sound so scary HAHAHA
Baldbytes
Baldbytes•14mo 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 DangOP•14mo ago
at least it works now, I just have to choose the email address and domain to forward now
Baldbytes
Baldbytes•14mo ago
yeah that should it be to get it running
Sang Dang
Sang DangOP•14mo ago
thanks so much
Baldbytes
Baldbytes•14mo ago
the chat widget and knowledge base is also a deep dive worth in case you need it
Want results from more Discord servers?
Add your server