Is there a way to simply send a erb file to a ruby parser get the answer back and send it to client with NGINX? Without all the passenger stuff? It should be easy i guess. I DON'T want to use any rails stuff, don't tell me i should use rails etc.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I created a script to do this two years ago, called ruby-cgi, in response to a similar question. I believe it does exacty what you want. Just set it up the same way you would set up other CGI/FastCGI handlers.
回答2:
The following gems are available (sorted by feature completeness desc):
rack-server-pages
rhr
回答3:
Of course you can, try this. But I would highly recommend using Sinatra as it's more like a ruby way of serving web pages like in php