3 ms·
I wrote a gem in ruby a year or so back using 1.8. When 1.9 came out, it was extremely easy to port it. OTOH, I've been hearing that people have written books
by crazydiamond 16y ago
I wrote a gem in ruby a year or so back using 1.8. When 1.9 came out, it was extremely easy to port it.
OTOH, I've been hearing that people have written books for Python 3 which hasn;t taken off. Now they are backporting their books to 2.x (e.g Dive into ..).
There is a negative side too. Everyone's writing gems. There are plenty of gems floating around, some incomplete some abandoned, its hard to tell. When i worked in Java years back, aside from the Java distribution itself, i used to use libs from jakarta.apache. One knew they would be maintaining it, and the quality would be good.
In Ruby, i really don't know of any such company or initiative, that maintains libraries. It's too open. I get frightened when i download a gem which has many dependencies, since sooner or later some deps are going to break. That's happened several times. Even some of the well-known rubyists abandon their gems and don't respond to mails or bug reports since they are busy in ruby confs, or setting up their startups.
Then there's the gem creation process, which seems to be changing. I typically tend to google (maybe this is my fault) and i get outdated docs on creating a gem or publishing it. Hopefully, the ruby-lang.org site has an updated link on suggested or preferred way to create a gem. Every time i create a new version of my gem (it uses hoe), it seems hoe has changed, and I struggle to find a sample to correct it.
However, I love ruby too.
- outotrai 16y agoI don't use Ruby very much, so I can't respond to the bulk of your comment, but I wanted to note that Dive Into Python was first written for Python 2.x, then rewritten for Python 3, not the other way around. http://en.wikipedia.org/wiki/Mark_Pilgrim#Dive_Into_Python http://en.wikipedia.org/wiki/Mark_Pilgrim#Dive_Into_Python
- crazydiamond 16y agoI didn't contradict your statement. Going by the discussions on this site on another thread, it seems that the Python 3 book is being backported. That only means that exercises/examples in the 3 book are being back-ported - perhaps they will be added to a new edition of the 2.x book.
- mbleigh 16y agoYou should really take a look at Jeweler (http://github.com/technicalpickles/jeweler http://github.com/technicalpickles/jeweler) and MG (http://github.com/sr/mg http://github.com/sr/mg). They both make it extremely easy to maintain and publish gems to Gemcutter. Hoe was necessary back when RubyForge was the only gem host, but now that we have gem push it's not the simplest way.
- crazydiamond 16y agoThe other day while creating a new version for my gem, and getting hoe errors, i did look at the link above. It did not look so easy. Instead of creating a gemspec, or modifying my gemspec, i update the Rakefile and then generate a gemspec. I will try it out and see how it is. Again, should not ruby have one standard prescribed way of doing it, and not so many.
- bphogan 16y agoRuby does. Jeweler, Hoe, and other things are scaffolding for Gems. They get you going, but I found that as I relied on them too much I didn't really understand how it works. You can write a gemspec by hand which is what I have done now for my new gems that I'm working on. When I get time I will change the old ones to use a hand-rolled gemspec and a simple rake file for publishing. Gemcutter has made it trivial to take a hand-rolled gemspec and publish your gem. No libraries or gem scaffolding necessary.
- conorh 16y agoI don't really understand the need for Jeweler. Gemspec is a straightforward format and I've never had problems maintaing a gemspec by hand. It provides a version bumping rake task, but that is a single line edit in the gemspec.
- dhh 16y agoI agree that gem releasing used to be cumbersome, but the new gem creation process is redunkulously simple: 1) Signup at rubygems.org: http://rubygems.org/sign_up http://rubygems.org/sign_up 2) gem build my_lib.gemspec 3) gem push my_lib.gem That's it!