Skip to content

Instantly share code, notes, and snippets.

NoMethodError in Support callsController#new
undefined method `set_employee_id' for #<SupportCall:0x7740f6>
Rails.root: c:/Users/denton/code/billing
Application Trace | Framework Trace | Full Trace
app/controllers/support_calls_controller.rb:4:in `new'
Request
@jamesgecko
jamesgecko / gist:964581
Created May 10, 2011 14:30
rails generate migration error
c:\Users\james\code\test>rails generate migration RemoveDateCalled
NoMethodError: undefined method `[]=' for nil:NilClass
Application at c:/Users/james/code/test/config/application.rb:43
Test at c:/Users/james/code/test/config/application.rb:10
(root) at c:/Users/james/code/test/config/application.rb:9
require at org/jruby/RubyKernel.java:1038
(root) at c:/Users/james/code/test/config/application.rb:15
require at org/jruby/RubyKernel.java:1038
(root) at script/rails:6
<h1><%= session[:employee_first_name] %>'s call queue</h1>
<%= @foo %>
<ul>
<% last_date = '' %>
<% @employee.support_calls.reverse.each do |call| %>
<% date = call.created_at.strftime('%x') %>
<% if last_date != date %>
<div class="date"><%= date %></div> The date should only appear when it's different from the last one.
<% end %>
<li><%= link_to call.customer.name + ' - ' + call.caller + ' - ' + call.problem.truncate(32), edit_support_call_path(call) %></li>
class VehiclesController < ApplicationController
# GET /vehicles
def index
@vehicles = Vehicles.all
end
end
@jamesgecko
jamesgecko / error
Created May 31, 2011 21:19
dm-sqlserver-adapter bug
>jruby test-dm.rb
Connecting with DataMapper
DataObjects::URI.new with arguments is deprecated, use a Hash of URI components
(C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:231:in `normalized_uri')
NoMethodError: undefined method `blank?' for "":String
select_statement at C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-sqlserver-adapter-1.1.0/lib/dm-sqlserver-adapter/adapter.rb:48
read at C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:137
read at C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-core-1.1.0/lib/dm-core/repository.rb:162
lazy_load at C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-core-1.1.0/lib/dm-core/collection.rb:1117
each at C:/dev/jruby-1.6.2/lib/ruby/gems/1.8/gems/dm-core-1.1.0/lib/dm-core/support/lazy_array.rb:409
from twisted.web.server import Site
from twisted.web.resource import Resource, IResource
from twisted.internet import reactor, task
class Customer(Resource):
def __init__(self, customer_id=100):
Resource.__init__(self, customer_id)
self.customer_id = customer_id
def render_GET(self, request):
@jamesgecko
jamesgecko / log.txt
Created December 1, 2011 17:54
Blather traceback
D, [2011-12-01T11:52:43.152594 #19862] DEBUG -- : NEW JID: status@ais/blather
D, [2011-12-01T11:52:43.154074 #19862] DEBUG -- : SENDING: (/home/james/.rvm/gems/ruby-1.9.2-p290/gems/blather-0.5.9/lib/blather/stream/client.rb:21:in `start') <stream:stream to='ais' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en' >
D, [2011-12-01T11:52:43.157814 #19862] DEBUG -- :
------------------------------
D, [2011-12-01T11:52:43.157916 #19862] DEBUG -- : STREAM IN: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9b3094cb-0b64-4eda-9779-cbec3b26b5b7' from='ais' version='1.0' xml:lang='en'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features>
D, [2011-12-01T11:52:43.158968 #19862] DEBUG -- : RECEIVING (str
@jamesgecko
jamesgecko / sscce.py
Created December 8, 2011 20:45
Feed list
Unhandled Error
Traceback (most recent call last):
File "sscce.py", line 32, in <module>
reactor.run()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1162, in run
self.mainLoop()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1171, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 766, in runUntilCurrent
@jamesgecko
jamesgecko / winmanager.rb
Created January 30, 2012 16:06 — forked from mdnmdn/winmanager.rb
ironruby ActiveDirectory access
require 'System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
include System::DirectoryServices
class WinManager
attr_accessor :connection_string
if !defined? FLAG_CANNOT_CHANGE_PASSWORD
FLAG_CANNOT_CHANGE_PASSWORD = 0x40
FLAG_PASSWORD_NEVER_EXPIRES = 0x10000
@jamesgecko
jamesgecko / application.js
Created February 28, 2012 04:44 — forked from trevorturk/application.js
Ajax forms
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
});