Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11:18] | |
carlisia | |
does anyone here know how i can transfer data from my local db to my production db? | |
zapnap | |
if the database itself is different (sqlite vs mysql for instance) you will have to do a bit of data conversion to do so | |
[11:21] | |
carlisia | |
with a visual tool (GUI) i know how that can be done. i haven't tried, could i hook up my mysql GUI tool to my db on linode? i can't see why not, but just checking | |
[11:22] | |
SuttoL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_classifier(name) | |
# load energetic classifier | |
labels = Bayes.find(:all, | |
:select => "category", | |
:conditions => ["classifier = ? AND word is NULL AND count is NULL", name]) | |
str_labels = [] | |
labels.each do |l| | |
str_labels << l.name | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.dirname(__FILE__) + '/../test_helper' | |
class PhotoTest < ActiveSupport::TestCase | |
# FIXME: http://thoughtbot.lighthouseapp.com/projects/8794/tickets/35-should_have_attached_file - AVS | |
should_have_attached_file :image | |
should_belong_to :property | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Conference organizer tracks if enough attendees signup | |
Given a total of max-10 attendees | |
When 10 attendee registers | |
Then I should get an email notifying seating has been complete | |
Scenario: Conference organizer tracks if venue needs to be changed to accommodate more attendees | |
Given a total of max attendees | |
When 1 attendee registers | |
Then I should get an email notifying a new venue needs to be arranged | |
When new venue is selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backend: Express (node.js) based service using mongoose for object-document modelling. | |
Frontend: angular.js, along with several node.js modules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/dev/deals | |
โป tail -f log/development.log ruby-1.9.3p484 master 1526ca4 โ | |
Cache fetch_hit: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP] | |
Cache fetch_hit ==> iso_code_whitelist (0.0ms) [trace_id=1401391554_WuUCIP] | |
Cache read: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP] | |
Cache read ==> iso_code_whitelist (0.0ms) HIT [trace_id=1401391554_WuUCIP] | |
Cache fetch_hit: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP] | |
Cache fetch_hit ==> iso_code_whitelist (0.0ms) [trace_id=1401391554_WuUCIP] | |
Started request_method="POST" request_url=""http://lsdev.co/api/v3/merchant/vouchers/37528807/redemption.json?amount_paid_at_redemption=0.0"" at request_time="2014-05-29 12:25:55 -0700" request_ip="127.0.0.1" headers: HTTP_USER_AGENT="Ruby" params: accept="json" content_type="json" X-LivingSocial-API-Key="2fda5d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
OlderNewer