Skip to content

Instantly share code, notes, and snippets.

hiboumac:~ antoine$ rvm install 1.9.3-head
Installing Ruby from source to: /Users/antoine/.rvm/rubies/ruby-1.9.3-head, this may take a while depending on your cpu(s)...
ruby-1.9.3-head - #fetching
HEAD is now at 14c3e60 Skip too heavy test.
From git://github.com/ruby/ruby
* branch ruby_1_9_3 -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
Running autoreconf
@smooki
smooki / gist:1391704
Created November 24, 2011 16:11
The action 'add_comment' could not be found for KittiesController ....
class KittiesController < ApplicationController
helper :comment
...
end
module CommentHelper
def add_comment
1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:2: warning: already initialized constant VERSION
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant MAJOR
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant BUILD
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant PATCH
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:6: warning: already initialized constant NUMBERS
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake.rb:27: warning: already initialized constant RAKEVERSION
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/early_time.rb:17: warning: already initialize
$ cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --prefix=/Users/antoine/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/antoine/.rvm/usr
## --------- ##
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
new-host-2:app_tizer antoine$ rake
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:2: warning: already initialized constant VERSION
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant MAJOR
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant BUILD
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:5: warning: already initialized constant PATCH
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake/version.rb:6: warning: already initialized constant NUMBERS
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2.2/lib/rake.rb:27: warning: al
new-host-2:app_tizer antoine$ bundle exec rake
/Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/devise-1.5.1/lib/devise/omniauth/config.rb:40:in `autoload_strategy': Could not find a strategy with name `Facebook'. Please ensure it is required or explicitly set it using the :klass option. (Devise::OmniAuth::StrategyNotFound)
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/devise-1.5.1/lib/devise/omniauth/config.rb:25:in `strategy_class'
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/devise-1.5.1/lib/devise/rails.rb:22:in `block (2 levels) in <class:Engine>'
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/devise-1.5.1/lib/devise/rails.rb:21:in `each'
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/devise-1.5.1/lib/devise/rails.rb:21:in `block in <class:Engine>'
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@apptizer309/gems/railties-3.0.11/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/antoine/.rvm/gems/ruby-1.9.2-p180@appt
<div id="cagnotte-detail">
<h2 class="title"><%= "#{@kitty.name} #{@kitty.objective}" %></h2>
<div class="clearfix" style="margin-bottom:15px;">
<section class="left">
<div class="etat">
<h3></h3>
<p><strong><%= @kitty.donations %>€</strong></p>
@smooki
smooki / gist:1595063
Created January 11, 2012 15:00
user model
class User < ActiveRecord::Base
include StaticList::Validate
# static_list [[:male, 0], [:female, 1], [:no_specified, 2]
validates_static_list_value :sex, Sex, :allow_blank => true
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, , :lockable, :timeoutable and
devise :invitable, :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,
$ cap deploy:update
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
* getting (via checkout) revision to /var/folders/yb/9_8ypxms37x45zv9htgbtc9c0000gp/T/20120112095212
executing locally: cp -R . /var/folders/yb/9_8ypxms37x45zv9htgbtc9c0000gp/T/20120112095212
command finished in 18463ms
compressing /var/folders/yb/9_8ypxms37x45zv9htgbtc9c0000gp/T/20120112095212 to /var/folders/yb/9_8ypxms37x45zv9htgbtc9c0000gp/T/20120112095212.tar.gz
executing locally: tar chzf 20120112095212.tar.gz 20120112095212
command finished in 2142ms
@smooki
smooki / _form.html.erb
Created January 13, 2012 15:27
:buffet_drinks undefined variable error ...
<%= nested_form_for [event, buffet] do |f| %>
<% if buffet.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(buffet.errors.count, "error") %>
prohibited this buffet from being saved:
</h2>
<ul>
<% :buffet.errors.full_messages.each do |msg| %>
<li><%= msg %></li>