Skip to content

Instantly share code, notes, and snippets.

Alfonso Uceda AlfonsoUceda

  • Toptal
  • Madrid
Block or report user

Report or block AlfonsoUceda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c7513e893d3effee63ff6e755c7de257
Boot Error
Something went wrong while loading /Users/alfonsouceda/code/projects/ruby/bookshelf/
Hanami::Model::Error: undefined method `call' for nil:NilClass Did you mean? caller
/Users/alfonsouceda/.gem/ruby/2.3.3/bundler/gems/model-8024bf39be21/lib/hanami/model.rb:88:in `rescue in load!'
/Users/alfonsouceda/.gem/ruby/2.3.3/bundler/gems/model-8024bf39be21/lib/hanami/model.rb:76:in `load!'
/Users/alfonsouceda/.gem/ruby/2.3.3/bundler/gems/hanami-42b63074f2bb/lib/hanami/components/components.rb:57:in `block (2 levels) in <module:Components>'
/Users/alfonsouceda/.gem/ruby/2.3.3/bundler/gems/hanami-42b63074f2bb/lib/hanami/components/component.rb:42:in `call'
AlfonsoUceda /
Last active Nov 18, 2016
Rails 4 here we go!

Rails 4 here we go!

Why we need Rails 4? Why is it nicer? No! well it is but that isn't the key. Our two main reasons are security and performance. I've been researching our current situation to migrate Rails 3.2 to Rails 4.0.13 and Paco has been done a lot of things.

He created two branches paco/rails4-compat and paco/rail4, the first one is a branch with changes needed in rails 4 but they are compatibles with rails 3 to make easier the upgrade, the latter has the minimum changes needed to upgrade to rails 4.

One solution to upgrade rails 4, it could be deploy to master when everything is fine in local and test passing, I mean, check in production mode in localhost and test the main points of the application.

I've created two PRs for both branches, first we need to merge paco/rails4-compat in master (and stable) and finally merge paco/rails4 in master and leave there one week or so. I explain in those PRs how should be updated because they are sync with stable so there aren't problems related

View gist:918d737cf5e4b6242ea4f848ae6a3485
require 'progressbar'
schedulings = Company.find_by_name("SPT").schedulings.preloads_for_indexing
@progress ='Processing schedulings', schedulings.count)
start_now =
puts "Started at: #{start_now}"
schedulings.find_each do |scheduling|
index: Scheduling.index_name,
You can’t perform that action at this time.