RTerraria is a Terraria server written completely in the Ruby language and utilizing the EventMachine network library. At the present moment, it's incomplete, but you are welcome to hack upon it.
RTerraria is licensed under Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). Full license can be found here:
http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
All of the server settings lie in the file config.rb, which is right next to main.rb.
To start the server just run ruby main.rb in the root directory.
Alternatively, if you are using Li/unix, you can do this:
chmod +x main.rb
./main.rb
ruby 1.9.3-p0 - See below for how to install w/ RVM.
eventmachine - See below for how to install w/ RVM.
rvm - Not required but easy to use.
Install (Ubuntu 11.10): sudo apt-get install ruby-rvm
To use RVM everytime you start bash you need to run: source /etc/profile
To install ruby: rvmsudo rvm install 1.9.3-p0
To install eventmachine: rvmsudo rvm gem install eventmachine