Skip to content

Instantly share code, notes, and snippets.

View loganrice's full-sized avatar

Logan Rice loganrice

View GitHub Profile
@loganrice
loganrice / .dockerignore
Created March 21, 2018 22:27 — forked from davidderus/.dockerignore
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod
version :thumb do
def full_filename(for_file)
super(for_file).chomp(File.extname(super(for_file))) + '.jpg'
end
def convert_thumb_to_jpg
manipulate! do |image|
image.auto_orient
image.format 'jpg'
landscape = "75x56"
@loganrice
loganrice / uploader
Created May 30, 2015 18:32
convert pdf to png
# encoding: utf-8
class VehicleUploader < CarrierWave::Uploader::Base
# include CarrierWave::RMagick
include CarrierWave::MiniMagick
version :to_png do
process :convert_to_single_png
def convert_to_single_png
@loganrice
loganrice / gist:c7549bda2905666d9780
Created September 26, 2014 04:10
Heroku Deployment: NameError: uninitialized constant CarrierWave::Storage::Fog
rake deploy:staging
============================================================
>> Updating Repo Tag: staging
============================================================
Everything up-to-date
============================================================
>> Pushing refs/tags/staging to Heroku
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/loganrice/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary