0

I have written Ruby code to convert a number to words. Am running it on my ruby console locally.

So now, am considering a very simple webpage with an input text field for users to enter the number and an output field to display the result.

I could have written the code in Javascript, but I preferred to hide the code from users, and at the same time I wanted to get my hands dirty trying to learn Ruby.

So now, what are my options, should I use Sinatra (heard it is the most basic framework) or can it be done without any framework?

4

1 回答 1

1

有很多 ruby​​ 框架可供选择。Sinatra,还有 Rails、Padrino 和一些轻量级的 Camping。

如果你真的想亲自动手,你也可以在不使用任何一个的情况下构建一个 Rack 应用程序:

http://m.onkey.org/ruby-on-rack-1-hello-rack

于 2013-06-09T18:51:08.463 回答