Now that the error has been fixed by adding require 'tournament_system'
here is my new error:
This is the terminal:
Rendering html template
Rendered html template (0.0ms)
Rendered tourneys/index.html.erb within layouts/application (10.8ms)
Completed 401 Unauthorized in 16ms (Views: 0.3ms | ActiveRecord: 1.1ms)
RuntimeError - Not Implemented:
app/controllers/tourneys_controller.rb:77:in `tourn'
app/views/tourneys/index.html.erb:37:in `_app_views_tourneys_index_html_erb__1482772099755741577_70314301318160'
Started POST "/__better_errors/deabb75178ea93ac/variables" for ::1 at 2018-04-17 00:55:03 -0700
This is on the webpage
Not Implemented
tournapp/controllers/tourneys_controller.rb
72
73
74
75
76
77
78
79
80
81
82
def tourn
driver = Driver.new
# Generate a round of a single elimination tournament
TournamentSystem::SingleElimination.generate driver
#Challonge::Tournament.find(:all)
#@teamArray2 = render html: "<div>#{Challonge::Tournament.find(:all)}</div>".html_safe
end
>>
This is a live shell. Type in here.
Request info
Request parameters
{"controller"=>"tourneys", "action"=>"index"}
Rack session
(object too large. Modify ActionDispatch::Request::Session#inspect or increase BetterErrors.maximum_variable_inspect_size)
Local Variables
driver
#<Driver:0x00007fe6a4eba5e0>
I believe the error has to do with not calling the driver correctly. Also I created the controller Tourney using a scaffold.
Your Class Driver
was inhereting from TournamentSystem::Driver
but that module was not available as it was not explicitly required.
Adding require 'tournament_system'
should take care of that.
Regarding the NotImplemented
error, this is not related to your code. If you follow the source code of def generate
in module SingleElimination
(source code) and traverse:
def generate calls create_matches which calls create_match which finally calls build_match and that has a raise 'Not Implemented'
.
The Developer of the project has not completed implementing all the required functions.