If config.rb is in your load path, you can require it at the top of your basics.rb file with require 'config'
. If it is not in your load path, you'll need something like require '/path/to/your/config'
.
The code you've posted will require the file. But only when someone POSTs to '/'.
Also, it's normal to omit the .rb extension when requiring ruby files. But you can include it if you like.
You can view your load path by inspecting the global variable $LOAD_PATH
. From the command line ruby -e 'puts $LOAD_PATH'
will print it for your version of ruby. You can also add directories to your load path.