Tag Archives: open source

Be careful with stub! in RSpec

First of all, you should be careful with any call to stub.

You probably want to use stub just to simulate a behavior, one that you don’t want to test in your current test.

For example: You may want to use stub with a remote service, an API call.

Posted in developer tools, Ruby programming, web programming | Also tagged , , | Leave a comment

How to push a Postgres database to your Heroku app

But why?

You have a local Postgres database that’s ready to go and you want your server to have the same database.

Posted in open source, Ruby programming, web programming | Also tagged , , , , | Leave a comment

Liquid error: undefined method ‘paginate’ for Array (WillPaginate 3.0)

If you ever find this problem (Github Issue) you should know that WillPaginate 3.0 isn’t backwards compatible. This also is tightly coupled with the new Active Record implementation (Now it returns ActiveRecord::Relation, which are lazy arrays) This solved the problem I was having: 12  # app/config/initializers/liquid.rb   require ‘will_paginate/array’ Be careful when you upgrade your [...]

Posted in open source, programming, Ruby programming, software engineering, web programming | Also tagged , , , , | Leave a comment