Re: [Rails] How do I run an action on a dedicated thread?

2019-08-10 Thread San Ji
Thank you, Phil The latter suggestion is actually what I planned to do, with nginx handle the path routing instead of having separated endpoints. May I ask why did you switch away from the approach? IMHO, the approach is safer than mixing every request up in a single pool. As I described, the

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-11 Thread San Ji
Jim, good point The assumption is not from me, but from me guessing from a response by Puma's member. Anyway, I already asked him to clarify why would a lock occurred. You can follow how it goes here: https://github.com/puma/puma/issues/1895 I genuinely believe I am not overthinking this

[Rails] Re: ActiveModel::Attributes (array: true) - should it require Postgres?

2019-08-11 Thread San Ji
ActiveModel is agnostic to the database, you can use it without using any database, so no, it should not require Postgres. I believe array: true on an ActiveRecord model, with MySQL, or SQLite, is possible too. Just combine it with "serialize"

[Rails] Re: ActiveModel::Attributes (array: true) - should it require Postgres?

2019-08-11 Thread San Ji
Sorry wrong reference You should look at https://apidock.com/rails/ActiveRecord/AttributeMethods/Serialization/ClassMethods/serialize instead. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

[Rails] Re: Any Rails Event Store companies here in New York City?

2019-08-11 Thread San Ji
I used that gem in the past, but I am not in New York City. Just a little of caveat, you are pretty much locked in. A lot of features of the gem deliberately designed to lock you in. Take the event linking features for an example. Under the hood, the gem exploits relations of the relational

[Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Hi I run Rails on quite a complicated situation but the gist of it is, in my application, it is possible that an action can call some external services which fetch data from another action via another http call to the application itself. (Basically a cyclic http call) It is by design and there

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Thank you for the reply, but the client is not a web browser, so no javascript and no polling possible, plus not in our control. To be more specific the call to the external service is via a headless browser, not even a direct HTTP call, and you cannot push the data along with the request made

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Architecture wise the application is way better than average Rails apps IMO. The dependency direction is one way internally, with no cyclic dependency. (even with the ActiveRecord class, that in almost all other Rails app contains cyclic dependency between models) Network perspective may

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
No worry And thank you again. I also asked the Puma guy. They basiaclly said they receive this inquiry frequently, and they don't support it as they did not use it themselves. https://github.com/puma/puma/issues/1895 I am still open for any pointers and suggestions. Maybe Puma guys just don't

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-09 Thread San Ji
Hi Hassan I don't because that would not solve my problem. He was describing a kind of more usual deadlock caused by the global interpreter lock. Where Puma send the cyclic request to the same multithreaded worker, but the worker was unable to process the latter request because of the GIL. (I

[Rails] Re: How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-30 Thread San Ji
Sad, indeed -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit

[Rails] How do you run the test suite with docker-compose in a Dockerized Rails app?

2019-10-30 Thread San Ji
docker-compose run? https://docs.docker.com/compose/reference/run/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Rails] How to validate email address that actually exists using Rails

2019-12-10 Thread San Ji
I feel your pain. Some user just stubbornly don't accept that they got the wrong email address. For such normal use case, I use Amazon SES as my transactional email sender. They deliver bounce reports in various channel (including HTTP) via their SNS service. See more info about it here:

[Rails] Re: Is it possible to serialize an ActiveRecord object?

2019-12-03 Thread San Ji
Most of the time, as Adam suggested, the database would do this for you already. But if it does not works, your table is just so large; it won't fit in the memory. (I guess) If the situation allow, try adding more memory to the database instances. If the size of your data is not in the same

[Rails] Question about system tests and thread-safety

2019-12-16 Thread San Ji
If you are running your Ruby code on MRI (the official implementation) there is no way to make your Ruby code any threadsafer. They have global interpreter lock in place. Segfaults generally don't cause by Ruby code, and when it does it is a bug of the interpreter itself. -- You received this

[Rails] Shouldn't rails.gemspec include the MIT-LICENSE file in the specification files?

2019-10-16 Thread San Ji
You do realize that this is not the rails-core group, where people talk about the development of rails framework, right? If you want to convince them I suggest preparing some court cases where not including the MIT license file in the package bundle is an issue. Good luck -- You received

[Rails] Re: Why do basic forms not work in Rails 6 without binding events to each form?

2020-02-18 Thread San Ji
I don't think you can blame Rails 6 for that. It is a weird default, but it is like that from the very beginning. I never use the method, so, I guess, it can be considered as somewhat obscure. It seems to appear in Rails version 5.1 and no change since. Normally, I would use ActiveModel for a

[Rails] Re: Why do basic forms not work in Rails 6 without binding events to each form?

2020-02-20 Thread San Ji
For your information, the context of my previous post is focused on form_with, the method in the discussion. But, for broader sense, Basecamp and DHH are great and generous companion to be in the same community. You can't find community like this somewhere else. However, we all eventually grow

[Rails] Froala WYSIWYG Editor on Rails 6

2020-02-20 Thread San Ji
Hard to pass this thread without mentioning Action Text; It is the Rails way of WYSIWYG editor and shipped with Rails 6. If you know about it already, NVM. As for the question itself, I never heard about Froala until today. -- You received this message because you are subscribed to the Google

[Rails] ActionCable->Stimulus: Dispatch received message to controller

2020-01-13 Thread San Ji
Hi, I did not use Stimulus so it may sound like trolling, but it is very real and doable. For me it is not about Stimulus; when you are talking about software architecture, I know a thing or two. If your business logic is coupled with Stimulus (i.e. you are mentioning any name from Stimulus

[Rails] [JOBS] Ruby on Rails developer - Remote OK

2020-01-07 Thread San Ji
Whoa This is the most active job (no pun intended) topic since I subscribed to the group. I wonder what make this one stand out. Is it the "cannabis" bit that make it sexy? Other parts of the post made it look boring IMO. Could anyone tell me what's special about it? -- You received this

[Rails] Is it worth switching to Postgresql?

2020-03-14 Thread San Ji
No, it isn't. If you notice only those 2 downside, you'd better stick with you current choice. MySQL 8 has better encoding support, I am assuming you're mentioning about emoji encodings. And you can also learn Docker for ease of development to address the other issue you have. -- You received

[Rails] We are moving to https://discuss.rubyonrails.org/

2020-03-25 Thread San Ji
A little bit sad. The only reason I am still reading this forum is because I can read it in my email inbox. IMO, the new forum is easy for people asking something; but for people answering, there is no reason to keep checking the forum regularly. Goodbye, then And thank you for the good works

[Rails] finding function defenition

2020-03-21 Thread San Ji
To my knowledge, what you are looking for is not possible for Ruby. What you got in RubyMine is the closest, basically it index all words and apply some language heuristics to scope down choices. This is good enough in most cases. Systematic way to do it is impossible because Ruby supports