In this article, I’ll try to cover all the issues that I had, when I was upgrading one of my Rails app from Ruby on Rails 4.2 to Ruby on Rails 5.0. Note: This is not a complete, covering every possible case tutorial. You might encounter issues that I didn’t. If so, feel free to […]
Read more at the sourceCategory Archives: Rails4
Migrating from Protected Attributes to Strong Parameters
In Rails3, we use attr_accessible or attr_protected(Protected Attributes) to white-list attributes of a model for mass assignment. In Rails4, Protected Attributes was moved out as a Gem and similar feature was implemented at the controller level, which is now known … Continue reading →
Read more at the sourceMaking Errbit work faster by keeping it clean and tidy
Errbit is a great tool for collecting and managing errors from ruby applications. It’s like Airbrake but can be self-hosted, so you can use it for intranet applications or any apps that should not send data to an external servers. Errbit is a really good piece of software, unfortunately it can get pretty slow, when […]
Read more at the sourceAdding reentrancy and a on failure fallback for your Sidekiq workers
Few months ago I’ve created a post about reentrancy: Ruby (Rails, Sinatra) background processing – Reentrancy for your workers is a must be!. In this post, I will present a nice way to implement such feature for your Sidekiq workers. Simple reentrancy Normally a Sidekiq worker looks similar to this one: and if something goes […]
Read more at the sourceUpgrading to Rails 4.1 from Rails 4.0 – Ruby on Rails
Upgrading to Ruby on Rails 4.1 was much easier than moving from 3.2 to 4.0. Maybe because I try to keep all the apps up-2-date, maybe because Rails guys didn’t change much stuff (or maybe both). Either way, lets get through it. Paperclip – String based terminators are deprecated, please use a lambda Well […]
Rack/Ruby on Rails: ArgumentError: invalid byte sequence in UTF-8
# Quick test – just copy-paste this: ?%28t%B3odei%29 into your app url – if app crashes, you should read stuff below If you’re here, than probably you’ve encountered this weird issue: you might even have a backtrace like this: First of all, this issue is not super-important. It’s not a security issue as well. […]
Asset Pipeline has been extracted as sprockets-rails
The asset pipeline which was introduced in Rails 3.1, has been extracted to a separate gem called sprockets-rails. Performance for assets compiling has been improved. There is a open pull request to merge turbo-sprockets-rails3 to sprockets-rails, whic…
Read more at the sourceAction and Page caching has been extracted as gem
With the commit c82cf81f00f
Action and Page caching has been extracted from Action Dispatch as `actionpack-action_caching` and `actionpack-page_caching` gems