Live data from Hacker News

Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

news.ycombinator.com

1–10 of 79 posts

Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

#1
Ruby on Rails (RoR) dominates web development in Ruby. It's rich in features, but it's also a heavyweight framework.

Do you eschew RoR and use an alternative Ruby web development approach? (Example: different framework, or writing your own framework)

Re: Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

#4
We have a lot of internal APIs written using Sinatra.

I first started writing my APIs using Sinatra about 10 years ago. I had started with Rails when it first came out around 2005, liked it, but then ran up against a lot of issues. Sinatra and the Sequel gem were amazing so I switched to that, since I didn’t need most of what Rails had.

Now I just use those two out of habit. Rails is a LOT better now, but i still just reach for Sinatra and Sequel usually.

Re: Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

#7
What do you mean by "heavyweight"? Also why is it a problem that something is "heavyweight"?

What problem are you trying to solve by asking these questions? What context is this question for? Are you curious how many people use a non-rails solutions for enterprise apps? Cloud apps? Personal projects? Apps you want users to pay for? A blog?

I'd suggest stating what problem you'd like to solve by asking this question so you can receive more detailed feedback. For example, if your company is spinning up a new app and you're evaluating choices, someone may respond that they used sinatra but found themselves reinventing rails so they wish they would have used rails. I'd say this is more insightful than "yea, we use sinatra". Alternatively, maybe someone used sinatra for a personal project and found the experience of reinventing rails rewarding and educational on their own time. Let us help you!

Re: Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

#8

We have a lot of internal APIs written using Sinatra. I first started writing my APIs using Sinatra about 10 years ago. I had started with Rails when it first came out around 2005, liked it, but then ran up against a lot of issues. Sinatra and the Sequel gem were amazing so I switched to that, since I didn’t need most of what Rails had. Now I just use those two out of habit. Rails is a LOT better now, but i still jus…

I see a good bit of Sinatra out there in the wild for exactly this -- API only services. I even see it in shops that are running Rails everywhere else.

It does seem to be much more the exception than the rule. But it may be getting more common with kubernetes deployments which make lots of individual services a bit easier to manage.

Re: Ask HN: Who’s using Ruby for web development, without Ruby on Rails?

#10
post #7

What do you mean by "heavyweight"? Also why is it a problem that something is "heavyweight"? What problem are you trying to solve by asking these questions? What context is this question for? Are you curious how many people use a non-rails solutions for enterprise apps? Cloud apps? Personal projects? Apps you want users to pay for? A blog? I'd suggest stating what problem you'd like to solve by asking this question s…

> What do you mean by "heavyweight"?

Rails latest release (7.0.4) have 386,970 lines of code in total, 310,779 of it being Ruby code. 3000 files in total. Just the `lib` directory of `activerecord` has 33,036 lines of code, across 369 files.

By most metrics, RoR is pretty heavyweight, as their literal taglines are "Ruby on Rails scales from HELLO WORLD to IPO" and "A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern", so it needs to be pretty big to support those use cases.

Full `cloc` report in case someone is curious:

        4268 text files.
        3839 unique files.
         511 files ignored.
    
    github.com/AlDanial/cloc v 1.96  T=1.25 s (3079.1 files/s, 434339.6 lines/s)
    -------------------------------------------------------------------------------
    Language                     files          blank        comment           code
    -------------------------------------------------------------------------------
    Ruby                          3013          73152          54669         310779
    Markdown                        92          19324            388          45525
    JavaScript                      87           2974           2170          20955
    YAML                           171            406            350           3679
    CSS                             23            347            152           2409
    ERB                            386            303              9           2244
    CoffeeScript                    12             97            125            413
    JSON                            11              7              0            372
    HTML                            21             15              3            200
    Bourne Shell                     2             20             25            167
    Text                             7              0              0             51
    yacc                             1              4              0             46
    SQL                              1              6              0             43
    Dockerfile                       1              7              7             40
    SVG                              7              0              1             36
    builder                          3              1              0             10
    DTD                              1              0              0              1
    -------------------------------------------------------------------------------
    SUM:                          3839          96663          57899         386970
    -------------------------------------------------------------------------------
Post reply on HN