ruby - Sinatra Modular Application not working -


I'm new to Sinatra, and I'm learning it by following the README file. My final goal is to create a modular application in the form described on the page. Unfortunately, my application does not work - if I use config.ru it generates an error: uninitialized constant object :: MyClass (NameError)

and to modify the code:

  Run! If app_file == $ 0   

is not working also below is my code:

my_app.rb:

  required 'Sinatra / base' class MyApp & lt; Sinatra :: Get the Base / 'Test and Deaf Test Returns' Hello World! "End.exe   

config.ru:

  is required File.dirname (__ file __) + '/ my_app' Run Myapp.new   

command ruby ​​config.ru and rackup -p 4567 are not working - I ( NameError ) Is received, as I said earlier. Do anyone have any thoughts? Thanks a lot.

OK, I should not be so stupid to post such a problem which is a typo.

< P> Run MyApp.new

Comments