Skip to content

Instantly share code, notes, and snippets.

/Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:199:in `block in non_options': file not found: db:prepare_template (ArgumentError)
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:178:in `map!'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:178:in `non_options'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:237:in `non_options'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:58:in `process_args'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1073:in `_run'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:27:in `run'
from /Users/benoit/.rbenv/versions/2.1.0/lib/ruby/2.1.0/test/unit.rb:780:in `run'
@benoitr
benoitr / gist:be77908cf9012d2195ba
Created March 7, 2015 17:24
resource_controller
class Admin::ResourceController < Admin::BaseController
before_action :load_resource
def index
respond_with @collection
end
def edit
respond_with(:admin, @object)
end
require "time"
require "date"
class Date
def to_time
Time.local(year, month, day)
end
end
class Time
#!/bin/sh
read -r -p "Confirm deployment to PRODUCTION? Type 'yes' to continue " response
if [[ $response == "yes" ]]
then
# Precompile assets and commit to github
bundle exec rake assets:precompile RAILS_ENV=production
git add .
git commit -m 'recompiling assets'
git push origin master
@benoitr
benoitr / 0_reuse_code.js
Created May 20, 2014 09:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console