I'm having a problem with the final project.
I'm on step 7 of the final project. Running my file would always return the error:
undefined method 'chomp' for nil:NilClass (NoMethodError)
At first I thought I made a mistake in my coding so I tried and copy/paste Codecademy solution and it keeps getting the same error.
Here's a copy of the Codecademy solution for this step :
module Menu def menu " Welcome to the TodoLister Program! This menu will help you use the Task List System 1) Add 2) Show Q) Quit " end def show menu end end module Promptable def prompt(message = "Just the facts, ma'am.", symbol = ':> ') print message print symbol gets.chomp end end class List attr_reader :all_tasks def initialize @all_tasks =  end def add(task) all_tasks << task end def show all_tasks end end class Task attr_reader :description def initialize(description) @description = description end end if __FILE__ == $PROGRAM_NAME include Menu include Promptable ml = List.new puts 'Please choose from the following list' until ['q'].include?(user_input = prompt(show).downcase) case user_input when '1' ml.add(Task.new(prompt('What is the task you would like to accomplish?'))) when '2' puts ml.show else puts 'Try again, I did not understand.' end end puts 'Outro - Thanks for using our awesome menuing system!' end
I thought maybe it was a problem with Ruby on my computer so I tried it on codecademy labs and it returns nil
When I run it in Ruby course editor it return a problem with unexpected "end".
I'm stuck because I can't test my project so I can't keep going on the following steps.
Anyone can help me on this?