Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I would like to run a websocket listener on the server to listen for message and update data or invoke worker accordingly. I would like to write it as a Rails module so it can update ActiveRecord and enqueue Sidekiq task seamlessly. What is the good practice in doing this?
I looked through many possible practices and found out that rails runner is the best for me.
You can also look for rake tasks.
And absolutely sure you can give a try to Faye-rails which will handle all the work without running separate workers explicitly.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
CronJob.perform_later
rails active job is work in background?
Yes, when you run AnyJob.perform_later it will enqueue the job to perform in background: https://guides.rubyonrails.org/active_job_basics.html.
You might use sidekiq or resque (or other gems) to execute the background jobs. I'd recommend using sidekiq though.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have an application I would like to sell to potential clients. When I deploy and install this application on their server I would like to have something that automatically creates some demo data.
Is there a way to do this? Or would that be done with seeds?
Yes, you can use rails scaffold to generate resources and yes you can use seeds to create demo data in your db.
You add any data that needs creating in your seeds.rb file and execute them using bundle exec rake db:seed.
see here for some examples on how to do it
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm currently developing a rails app, based on Redmine, using a multitenancy approach. The app it is intended to be used by lots of users (at least I hope so :)), so it is important that it can handle several requests without compromise its performance. Having this in mind, I'm wondering which rails server would suit my needs best. I'm currently using thin, for memory savings purposes, but I'm afraid it is not the best choice for me... I've used unicorn before and I liked it a lot, but it was consuming a lot of memory and I had to change it to another one, but I've noticed that my app is not as fast as it used to be. Any advises? Thanks a lot in advance!
Use Passenger with Apache.
check here
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Now with Spring built-in with rails 4.1, I am curious about why the dev-team chose Spring over the others (Zeus and Spork).
Why did they choose Spring?
If you read the README from the v0.9 tag of Spring it should answer your question: https://github.com/rails/spring/tree/v0.0.9
The highlights appear to be:
implemented in pure Ruby
makes use of Rails' built-in code reloader
totally automatic (boots up in the background the first time you run a command)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
As a beginner & new developer attempting to learn the ropes, I am curious why we still use package managers, shell commands, and all of these things that seem like the early DOS days.
Wouldn't it seem more logical to have a GUI to simply set up an app on Heroku from Github without having to always fix all of your local environment errors and updating gems, etc?
May be a stupid question, but truly curious why it hasn't changed.