Skip to content

Instantly share code, notes, and snippets.

View leonmezu1's full-sized avatar

Leonardo Mezu leonmezu1

View GitHub Profile
@sheharyarn
sheharyarn / api_controller.rb
Last active April 27, 2022 08:53
Render API Errors in Rails
class APIController < ApplicationController
include JSONErrors
# ...
end
@djberg96
djberg96 / gist:2966965
Created June 21, 2012 16:51
Trouble installing pg gem on Windows
# I've got a have_library call failing when I tried to install the pg gem
c:\Users\djberge\Downloads\Ruby>gem install pg -- --with-pg-dir="c:\Program Files (x86)\PostgreSQL\9.1"
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
c:/usr/bin/ruby.exe extconf.rb --with-pg-dir=c:\Program Files (x86)\PostgreSQL\9.1
checking for pg_config... yes