Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot register more than one contender #58

Closed
st-atila opened this issue Feb 10, 2015 · 3 comments
Closed

cannot register more than one contender #58

st-atila opened this issue Feb 10, 2015 · 3 comments
Assignees
Labels
bug

Comments

@st-atila
Copy link

@st-atila st-atila commented Feb 10, 2015

A page (500 error) displays that states:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

The program console terminal shows:

localuser@localuser-ThinkPad-T60 ~/pinewood-derby $ DERBY_ADMIN_KEY="mypass" TRACK_SENSOR_DEVICE=/dev/pts/4 rvmsudo -E foreman start
11:21:04 web.1  | started with pid 32659
11:21:05 web.1  | /home/localuser/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.0.beta1/lib/active_support/values/time_zone.rb:285: warning: circular argument reference - now
11:21:07 web.1  | I, [2015-02-10T11:21:07.637386 #32661]  INFO -- : Sensor watch started w/ device search path: "/dev/pts/4"
***NOTE-- here is where I added the first contestant, "c1".
11:24:12 web.1  | /home/localuser/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.0.beta1/lib/active_record/associations/has_many_association.rb:74: warning: circular argument reference - reflection
11:24:12 web.1  | /home/localuser/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.0.beta1/lib/active_record/associations/has_many_association.rb:78: warning: circular argument reference - reflection
11:24:12 web.1  | /home/localuser/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.0.beta1/lib/active_record/associations/has_many_association.rb:82: warning: circular argument reference - reflection
11:24:12 web.1  | /home/localuser/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.0.beta1/lib/active_record/associations/has_many_association.rb:101: warning: circular argument reference - reflection

And the LOG shows

I, [2015-02-10T11:48:27.560009 #15914]  INFO -- : Completed 200 OK in 22ms (Views: 17.9ms | ActiveRecord: 3.2ms)
I, [2015-02-10T11:48:27.669351 #15914]  INFO -- : Started GET "/faye" for 127.0.0.1 at 2015-02-10 11:48:27 -0800
I, [2015-02-10T11:48:27.694757 #15914]  INFO -- : Started POST "/faye" for 127.0.0.1 at 2015-02-10 11:48:27 -0800
I, [2015-02-10T11:48:31.457250 #15914]  INFO -- : Started POST "/contestants" for 127.0.0.1 at 2015-02-10 11:48:31 -0800
I, [2015-02-10T11:48:31.458644 #15914]  INFO -- : Processing by ContestantsController#create as HTML
I, [2015-02-10T11:48:31.458773 #15914]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"ZXvirzbPi6MUr7sHLXCoWWkRAM6O52MIuod8zQJpNlI=", "contestant"=>{"name"=>"c2"}, "commit"=>"Register"}
I, [2015-02-10T11:48:31.468510 #15914]  INFO -- : Completed 500 Internal Server Error in 10ms
F, [2015-02-10T11:48:31.472662 #15914] FATAL -- : 
NoMethodError (undefined method `name' for nil:NilClass):
  app/controllers/announce_controller.rb:19:in `block in <class:AnnounceController>'
  app/controllers/contestants_controller.rb:52:in `block in create'
  app/controllers/contestants_controller.rb:51:in `create'
@nilbus
Copy link
Owner

@nilbus nilbus commented Feb 10, 2015

Investigating…

@nilbus
Copy link
Owner

@nilbus nilbus commented Feb 10, 2015

I have reproduced the issue. Working on a fix.

@nilbus nilbus closed this in 8e1b4de Feb 10, 2015
@nilbus
Copy link
Owner

@nilbus nilbus commented Feb 10, 2015

It looks like you hit a bug in the earlier version of Rails this was on! Fortunately it was fixed in a later release, and everything seems to be working now.

Update your gems by running bundle install, restart your mock_sensor and rails app server, and you should be set.

Thank you for reporting these issues!

@nilbus nilbus self-assigned this Feb 10, 2015
@nilbus nilbus added the bug label Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.