Jesse Clark jesseclark

View gist:1839236
1 2 3 4 5 6 7 8 9 10
Exception while importing: NCT01475461# (NoMethodError) "undefined method `[]' for nil:NilClass"
 
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/factory.rb:33:in `from_db'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/builders/embedded/many.rb:28:in `block (2 levels) in build'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/builders/embedded/many.rb:26:in `each'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/builders/embedded/many.rb:26:in `block in build'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/builders/embedded/many.rb:25:in `tap'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/builders/embedded/many.rb:25:in `build'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/mongoid-140f31f776cd/lib/mongoid/relations/accessors.rb:43:in `create_relation'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/m
View gist:1544217
1 2 3 4 5 6 7 8 9 10
// Here is an example of what I was seeing. We have a Study model that embeds many Locations.
// Locations in turn embed Facilities and Investigators.
 
// I was seeing Studies which had invalid location data. For example here is what a healthy study location
// block would look like (I've left all of the Study attributes besides locations out for brevity) :
{
"_id" : ObjectId("4c294eaf6f40d51f72000001"),
"locations" : [
{
"_id" : ObjectId("4eff14082b6df1825c00592d"),
View renderdirectly.rb
1 2 3 4 5 6 7 8 9 10
# see: http://yehudakatz.com/2009/12/20/generic-actions-in-rails-3/
class RenderDirectly < ActionController::Metal
include ActionController::Rendering
include AbstractController::Layouts
include AbstractController::AssetPaths
append_view_path Rails.root.join("app", "views", "direct")
append_view_path Rails.root.join("app", "views")
View .bash_profile
1 2 3 4 5 6 7 8 9
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
 
export EDITOR='mate -w'
 
export LC_CTYPE=en_US.UTF-8
 
TERM=xterm-color
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
Something went wrong with that request. Please try again.