Skip to content

Instantly share code, notes, and snippets.

@alexgodin
alexgodin / gist:1002913
Created June 1, 2011 18:16
Capybara webkit issue
Installing capybara-webkit (0.4.0) with native extensions /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/alex/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
Gem files will remain installed in /Users/alex/.rvm/gems/ruby-1.9.2-p180@fishes/gems/capybara-webkit-0.4.0 for inspection.
Results logged to /Users/alex/.rvm/gems/ruby-1.9.2-p180@fishes/gems/capybara-webkit-0.4.0/./gem_make.out
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:511:in `block in build_extensions'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `each'
from /Users/alex/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `build_extensions'
Feature: Sign Up
In order to allow users to register
As an unauthenticated user
I want to be able to signn with twitter
Scenario: Oauth success
Given An unauthenticated user visit the home page
When they click sign in with twitter
Then they should be successdully authenticated or they should be redirected to the homepage
@alexgodin
alexgodin / gist:1003400
Created June 1, 2011 21:42
cucumber step
The step:
Given /^I am not authenticated$/ do
cookies.permanent.signed[:user_id] = nil
end
The error:
undefined method `permanent' for #<Rack::Test::CookieJar:0x00000100f8f8f8> (NoMethodError)
./features/step_definitions/sign_up_steps.rb:2:in `/^I am not authenticated$/'
undefined local variable or method `get_rack_test_cookie_jar' for #<Cucumber::Rails::World:0x83073090> (NameError)
2011-06-07T22:02:17+00:00 app[web.1]: Started GET "/images/mobster1.png" for 78.147.68.202 at 2011-06-07 15:02:17 -0700
2011-06-07T22:02:17+00:00 heroku[router]: GET sleepwiththefish.es/images/mobster1.png dyno=web.1 queue=0 wait=0ms service=2ms bytes=1430
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]: ActionController::RoutingError (No route matches "/images/mobster1.png"):
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]:
2011-06-07T22:02:17+00:00 app[web.1]: Started GET "/images/mobster2.png" for 78.147.68.202 at 2011-06-07 15:02:17 -0700
@alexgodin
alexgodin / gist:1143352
Created August 13, 2011 01:09
dice roll
def roll_dice(number_of_dice)
number_of_dice.times {p roll_die}
end
def roll_die
r = Random.new
r.rand(1..6)
end
@alexgodin
alexgodin / gist:1158670
Created August 20, 2011 04:37
Failed homebrew install of macvim
Last login: Fri Aug 19 22:27:38 on ttys004
[~] brew install macvim
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-61
File already downloaded in /Users/alex/Library/Caches/Homebrew
==> ./configure --with-macsdk=10.7 --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pyth
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
@alexgodin
alexgodin / gist:1158672
Created August 20, 2011 04:38
Failed homebrew install of macvim
Last login: Fri Aug 19 22:27:38 on ttys004
[~] brew install macvim
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-61
File already downloaded in /Users/alex/Library/Caches/Homebrew
==> ./configure --with-macsdk=10.7 --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pyth
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
@alexgodin
alexgodin / disable-chat-logging
Created February 16, 2012 19:14 — forked from jesselamb/disable-chat-logging
Disable chat logging in Messages OS X app
defaults write com.apple.iChat SavedChatsFolder "/dev/null"
fortune | cowsay
@alexgodin
alexgodin / gist:2921409
Created June 13, 2012 02:18
BACKBONE HASHTAGS day 1
// An example Backbone application contributed by
// [Jérôme Gravel-Niquet](http://jgn.me/). This demo uses a simple
// [LocalStorage adapter](backbone-localstorage.js)
// to persist Backbone models within your browser.
// Load the application once the DOM is ready, using `jQuery.ready`:
$(function(){
// Todo Model
// ----------