5 ms·
I understand that if you like Ruby a whole lot and like being a web developer, but you don't like Rails for whatever reasons, it can be a frustrating experience
by jaredcwhite 5y ago
I understand that if you like Ruby a whole lot and like being a web developer, but you don't like Rails for whatever reasons, it can be a frustrating experience over the long haul.
But as a counter-example to that, I'm constantly amazed that there are a ton of Ruby gems out there which pretty much work as advertised outside of Rails (even if Rails gets a privileged happy path during config). Not to mention you can use ecosystem stalwarts like Puma, Rack, Sidekiq, and many other subsystems outside of a Rails app entirely. Heck, you can pull just bits of Rails in if you really need them. Want Active Record for your ORM but nothing else? That's totally possible! (But of course then you get a bunch of Active Support stuff too which is what the author objects to.)
Personally I love Active Support and actively (heh) bring it into my Ruby projects if it's not there already. To a certain degree, everything people say is a "bug" about Ruby's metaprogramming/monkeypatching is a feature in my book. The fact that "Ruby core" is simply a substrate upon which you can build your own flavor of a Ruby-plus language—be that "The Rails Way" or something else entirely—is amazing. In that respect, I entirely disagree that Rails is not written in Ruby. Rails shows us how you _can_ (and probably should!) use Ruby to build DSLs which suit your specific application/framework purposes very well. It's not a bug. It's a feature. And it's why most other tools which claim "Rails but for Language X" fall short…they can try to replicate features of Rails, sure—but because it's not Ruby, it misses the whole point of using Rails, which is that you get Ruby "for free" to sweeten the deal! That's the (not so) secret sauce here.
- chrisseaton 5y ago> I'm constantly amazed that there are a ton of Ruby gems out there which pretty much work as advertised outside of Rails I must come to Ruby from a very different angle to you - but I don't even really get what you mean. Why would the majority of gems have anything at all to do with Rails or need it to work as advertised? For example the top-ten gems have got absolutely nothing at all to do with Rails have they? https://rubygems.org/stats https://rubygems.org/stats
- ryeguy 5y agoBecause the ruby community generally revolves around rails. Stack overflow often has generic ruby questions where answers assume you're using rails (by referencing activesupport, for example). Just to give you an idea, on stackoverflow, there are 222k ruby questions and 330k rails questions tagged.
- matheusmoreira 5y agoIndeed. I subscribe to [ruby] and ignore [ruby-on-rails], it can get pretty lonely in there. Usually just basic questions. I wish someone would ask something that would require me to study the virtual machines in order to answer.
- busterarm 5y ago> Because the ruby community generally revolves around rails. Be careful about to which Ruby Community you believe you are speaking for. Keep in mind that a lot of development of the language itself is happening in Japan, in Japanese, where most people won't be regularly reading and posting on Stack Overflow. 5 of the core contributors live within 15 minutes of each other and meet and discuss issues in person. If you've watched recent developments in the Ruby Community there, especially in the areas where the Ruby team has made large performance gains to improve the language, Embedded Ruby (as in Ruby running on IoT devices, or mruby, not ERB templating) is actually a very hot topic and isn't even in the orbit of Ruby on Rails. Japan is still seeing growth in adoption of the language and has a huge number of Ruby conferences. There's multiple "regional" versions of RubyKaigi in Japan throughout the year.
- byroot 5y ago> Why would the majority of gems have anything at all to do with Rails or need it to work as advertised? That's what your often hear from "Rails skeptics". According to them people don't even know what is Rails and what is Ruby, and that because of this, gems either have Active Support as explicit dependency, or use Active Support extensions without knowing it and then don't work outside of Rails.
- JohnBooty 5y agoWhy would the majority of gems have anything at all to do with Rails or need it to work as advertised? If you put Rails-specific functionality in your gem, now you have a dependency on Rails, and given the seamless and transparent ways in which Rails (specifically, ActiveRecord and ActiveSupport) extend Ruby, it's easy to unintentionally wind up making the non- Rails specific bits of your gem depend on Rails somehow. Additionally one could say that AS/AR serve as sort of a defacto standard library of sorts at this point. You copy some code from Stack Overflow, it's got a dependency on one or the other, etc. I'm not endorsing that state of affairs. I actually don't know how I even feel about that state of affairs. The mostly-transparent extensibility of Ruby is the best and the worst thing about it. It's great if you're writing a framework or gem; but it makes it really tough for beginners to know what is doing what.
- chrisseaton 5y ago> If you put Rails-specific functionality in your gem Do a lot of gems do that? It's never something I've encountered when looking for gems to use in my Sinatra, command-line, etc applications.
- jaredcwhite 5y agoWhat I'm referring to is gems which are intended for use primarily by Rails devs in Rails projects can also be used outside of Rails.
- stonecharioteer 5y agoI love python but I loathe django. I cringe everytime I have to deal with it or developers who believe that is the right way to write a web app. It's hard. Either people are using python to write scripts which are poorly written or they're using it to write django. Most of them don't understand python at all. It's sad. I think Ruby has that problem with Rails. The ones who learn only Rails don't understand Ruby and don't use it for anything beyond Rails.
- jiaaro 5y agoI’ll admit to liking Django, but I don’t use it in every project. I don’t think Django has dominated the Python community to the extent to which rails has dominated the ruby community. For example Serverless applications, ML, the scientific community, and shell scripting all use Python without Django, and they’re pretty popular uses of the language. Also FastAPI appears to be doing pretty well
- stonecharioteer 5y agoSure, Django doesn't have that level of presence, but most of the tech companies I've interviewed with, especially startups, default to using Django alone, and being so rigid in their practices that they believe Django is everything. At my company, my colleagues only know Django or they write horrendous Python. I'm constantly doing my best to show them how to write production-grade python code without having to rely on Django - Airflow DAGs for example, but sadly, they seem uninterested - which is something I have realized I cannot fix. It's just a job, so at the end of the day I've to let go. It's odd though, how unreadable Python code can end up being if you don't bother caring about how you write code.
- ljm 5y agoOnly a language like Ruby could make Rails and the rapid prototyping setup work as beautifully as it does. I don't think it's a coincidence that we got _why, DHH, pragmatic programming and the like as soon as Rails put Ruby on the map back in the mid 2000s. It has a lot of Smalltalk in it in a way that is easy to step into from another language.