What is needed to run .rb file in a web browser?
(My first day in ruby)
I have Apache server (I’m coming from PHP) with passenger. Terminal proof:
gundars@linuxr528:~$ apache2ctl -t -D DUMP_MODULES
passenger_module (shared)
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
I also have installed rails etc, Tried to make a quick app with rails and it worked fine.
Now I would like to simply open .rb file in browser, and it is prompting me to save it.
This is how it looks in my browser, the window on right side pops-up after clicking, it asks where to save it.

Entries, concerning Ruby and this file, are:
apache2.conf:
LoadModule passenger_module /home/gundars/.rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /home/gundars/.rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11
PassengerRuby /home/gundars/.rvm/wrappers/ruby-1.9.3-p0/ruby
virtual-hosts.conf
<VirtualHost *:80>
ServerName tictactoe.ruby.dev
DocumentRoot "/localhost/sandbox/RUBY/tictactoe/"
ErrorLog /var/log/rubyonrails2.log
</VirtualHost>
/etc/hosts
127.0.0.1 tictactoe.ruby.dev
So the question – What is needed to run .rb file in a web browser?
I thought it’s what passenger was for…
Ruby is a server-side language. What you need is for a process to intercept your request, route it to the correct Ruby file, execute it, and send the output to your browser. Luckily, somebody has done this for you, with Rack and Passenger.
Why you would want to do this instead of working within the Rails framework is beyond me.