[Rails] ActiveRecord transactions thread safety

2014-06-02 Thread Alexey Chernenkov
My question is about AR transactions feature. Is it thread safe? Is it safe to use both `*ActiveRecord::Base.transaction do ...*` and `*Account.transaction do ...*` statements? I plan to use Puma as web server, and Sidekiq for background processing. Is there some tricks I should know about?

[Rails] Store files with carrierwave to remote server (may be via ssh/scp)?

2013-02-25 Thread Alexey Chernenkov
Im setting up production environment where all static content separated from web application server. I need to store all carrierwave powered content to another server, but by default carrierwave include only :file (for local files) and :fog (for cloud CDN) store support. How I can do that? --

[Rails] Rake task that allows you generate static error pages in public folder from partial.

2013-02-22 Thread Alexey Chernenkov
https://gist.github.com/907th/5013075 Rake task that allows you generate static error pages in public folder from layouts/exception partial. Usage: rake exceptions:compile_error_pages RAILS_ENV=production. Dependencies: colored gem for pretty output (https://rubygems.org/gems/colored), rails