Skip to content

Instantly share code, notes, and snippets.

View DanThiffault's full-sized avatar

Dan Thiffault DanThiffault

View GitHub Profile
#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git-core
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
sudo make install
# Filename: RAILS_ROOT/config/initializers/paperclip_thumbnail_with_dimensions.rb
# Required Configuration in the model
#
# include Paperclip::Dimensions
#
# has_attached_file :image,
# :styles => {
# :thumbnail => {
# :geometry => "100x100>",
# :format => :png