5 ms·
Stupid article. So if I write a ruby program that needs rubygems I need to ask people that will run it to please run my program with "ruby -rubygems foo.rb" or
by sunkencity 17y ago
Stupid article.
So if I write a ruby program that needs rubygems I need to ask people that will run it to please run my program with "ruby -rubygems foo.rb" or set an environment variable, instead of just requiring the gems. Because that would infringe on the domain system administrator of that system. That doesn't make much sense to me.
- robertduncan 17y agoAgreed. I don't understand how require 'rubygems' is any less succinct than ruby -rubygems foo.rb.
- masklinn 17y ago> So if I write a ruby program that needs rubygems I think Ryan's point is that most of the time your program doesn't require rubygems itself. You just happen to manage your libraries using gems, somebody else could do it an other way (and never need rubygems), but you're forcing that person to install gems regardless.
- sunkencity 17y agoThings tend to break a little less over time if I can require a version of a gem, like: gem 'png', '= 1.1' The good part about rubygems is that it's possible to get a certain version of a gem. I'd rather use gem and version than just require "png", and get god knows what version or file.
- masklinn 17y agoThat's a good point, and in this case requiring rubygems does make sense, but I really doubt that's the most common use case. Stuff like this: http://github.com/mojombo/jekyll/blob/2f2e45bedf67dedb8d1dc0d02612345ee5c893f2/lib/jekyll.rb http://github.com/mojombo/jekyll/blob/2f2e45bedf67dedb8d1dc0... or that: http://github.com/mwunsch/weary/blob/cd7b35ccee66757c5efb0a03cd54f9e89f1eaad7/lib/weary.rb http://github.com/mwunsch/weary/blob/cd7b35ccee66757c5efb0a0... is probably the kind of stuff Ryan rages against in his rant (though you'd have to ask him if that's that, and how he'd see you use case)
- sunkencity 17y agoyep I can agree that require 'rubygems' require 'png' is kind of pointless.
- sho 17y agoI don't know who is voting you up? Maybe because you sound angry, and people associate angry technical rants with people who know what they're talking about? "I think Ryan's point is that most of the time your program doesn't require rubygems itself." Yeah! You could have manually downloaded the files for all the libraries you need, placed them in the directory, and required them directly. See, who needs rubygems? Oh hang on, rubygems is about 1000x easier than doing all that. "You just happen to manage your libraries using gems" Yes, because gems are the standard way of managing libraries in Ruby, and work transparently and conveniently. Where the hell is Ryan getting all these gem-using libraries anyway, if not from gems? And what is supposed to be wrong with it, anyway? I have never had a problem using a non-gem library even with gems present and a duplicate installed. Just require the non-gem lib first. What is so freaking hard? I assume it's some stupid problem he has to solve at Heroku - and his solution is trying to change how the entire Ruby community does things, to their detriment, benefiting only him. Screw him. Oh well, anyway .. who cares. You're a crank and so is he. Rubygems is here to stay and if you don't like it .. well again, who cares.
- masklinn 17y ago> You could have manually downloaded the files for all the libraries you need Yes, why not? > placed them in the directory Placed them in any directory on my $LOAD_PATH, yes indeed. > and required them directly Uh no, there's nothing to touch there. Library is on $LOAD_PATH, any require $the_library will find it perfectly normally. > See, who needs rubygems? Nobody. Rubygems is a very nice convenience, not a requirement for anything. > Where the hell is Ryan getting all these gem-using libraries anyway, if not from gems? Tarballs? Github? Rubyforge? His colleagues? The Internet? And as a side note: if the library was obtained from gems, then it was loaded from gems, which means by the time the library is reached rubygems has already been required and loaded. Where's the sense in requiring the tool which loaded you in the first place, exactly? Doesn't that seem a bit dumb to you? > And what is supposed to be wrong with it, anyway? And what's wrong with not wanting to use it, anyway? (and what's wrong with it is that they clutter the $LOAD_PATH. You don't care, Ryan apparently does) > Oh well, anyway .. who cares. You're a crank and so is he. Rubygems is here to stay and if you don't like it .. well again, who cares. You… completely missed the point. It's impressive.