Skip to content

Instantly share code, notes, and snippets.

View cloudbring's full-sized avatar

Cloudbring cloudbring

  • Santa Monica, CA
View GitHub Profile
@cloudbring
cloudbring / gist:730952
Created December 6, 2010 21:08
Tmux Brew Failed Compile/Install
$ brew install tmux
==> Downloading http://downloads.sourceforge.net/tmux/tmux-1.3.tar.gz
File already downloaded and cached to /Users/e/Library/Caches/Homebrew
==> Downloading patches
==> Patching
patching file server.c
==> ./configure
==> make install
/usr/bin/cc -O3 -march=core2 -w -pipe -DBUILD="\"1.3\"" -iquote. -I/opt/local/include -c -o attributes.o attributes.c
/usr/bin/cc -O3 -march=core2 -w -pipe -DBUILD="\"1.3\"" -iquote. -I/opt/local/include -c -o cfg.o cfg.c
@cloudbring
cloudbring / env.rb
Created April 23, 2011 00:41
Stack level too deep Error
require 'rubygems'
require 'spork'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
require 'cucumber/rails'
@cloudbring
cloudbring / compass.rb
Created April 29, 2011 17:25
Sass Troubleshooting
# /config/compass.rb
# This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here.
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "public/stylesheets"
sass_dir = "app/stylesheets"
environment = Compass::AppIntegration::Rails.env
%tr
%td
= t("filename")
\:
%td= f.file_field :attachment
%td
= t("tags")
\:
%td= f.autocomplete_field :tag_name, autocomplete_tag_name_images_path
- if @product.has_variants?
@cloudbring
cloudbring / application.html.haml
Created May 6, 2011 05:26
Uninitialized constant Error
# views/layouts/application.html.haml
# Rails Error: uninitialized constant ActionView::CompiledTemplates::DOMAIN_CONFIG
%p
Request Domain
= request.domain.inspect
DOMAIN_CONFIG:
= DOMAIN_CONFIG.to_yaml
class ProductsController < Spree::BaseController
HTTP_REFERER_REGEXP = /^https?:\/\/[^\/]+\/t\/([a-z0-9\-\/]+)$/
#prepend_before_filter :reject_unknown_object, :only => [:show]
before_filter :load_data, :only => :show
resource_controller
helper :taxons
actions :show, :index
register Padrino::Admin::AccessControl
set :login_page, "/"
access_control.roles_for :any do |role|
role.protect "/profile"
# role.protect "/admin" # Here a demo path
end
# Adding a role for users
# register Padrino::Admin::AccessControl
# set :login_page, "/"
# access_control.roles_for :any do |role|
# role.protect "/profile"
# # role.protect "/admin" # Here a demo path
# end
# # Adding a role for users
@cloudbring
cloudbring / cmdline
Created December 8, 2011 23:08
Capybara + Cucumber + Padrino config issue
± |t4 ✗| → padrino rake spec --trace
=> Executing Rake spec --trace ...
** Invoke spec (first_time)
** Invoke spec:models (first_time)
** Execute spec:models
/Users/e/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S rspec -fs --color ./spec/models/repository_spec.rb
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/capybara-1.1.2/lib/capybara/cucumber.rb:6:in `<top (required)>': undefined method `World' for main:Object (NoMethodError)
from /Users/e/work/sg/t4/spec/spec_helper.rb:15:in `require'
from /Users/e/work/sg/t4/spec/spec_helper.rb:15:in `block in <top (required)>'
from /Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/spork-0.9.0.rc9/lib/spork.rb:24:in `prefork'
@cloudbring
cloudbring / .rvmrc
Created December 20, 2011 18:45 — forked from sr/Gemfile
Janky on Heroku
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
environment_id="ruby-1.9.2-p290@jankd"
#
# Uncomment following line if you want options to be set only for given project.