I have some .rb (Ruby script) files that I link to on my website.
By default, the browser just downloads them to the "Downloads" folder, as it does zip files.
I want the browser to treat it as text, so the Ruby script will show within the browser.
If I do this the normal way however, it does indeed show up in the browser, but the problem is that when the user does a "right-click save as" on the file, the downloaded file gets appended with .txt, such as myscript.rb.txt
Can this .txt extension be avoided with nginx settings?
I do this the normal way however
What was that normal way? Please update your question on how you made ruby script to show up in the browser. That'd help to see, if anything is wrong in that way. Also, it is preferable to post which browser and OS you used to save. Sometimes, it is the OS and / or the browser that may act weirdly!