4 ms·
> 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 diffe
by 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.