4 ms·
Experience Switching From Ruby 1.8 to Ruby 1.9
- Tichy 17y agoI reverted to 1.8 because I could not find documentation for the Standard Library of 1.9. Generating it myself also proved impossible (out of memory errors and other issues).
- nudded 17y agoI thought http://www.ruby-doc.org http://www.ruby-doc.org has docs for the 1.9 library (also for the 1.8.7 and 1.8.6)
- Tichy 17y agoThey only have docs for core, not for the standard library.
- ionfish 17y agoYeah, ruby-doc.org is pretty annoying in this regard, especially since they do actually have the stdlib documentation available, they just don't link to it. Have a look at this search, for example: http://www.google.com/search?q=site%3Aruby-doc.org%2Fcore-1.9%2Fclasses+array http://www.google.com/search?q=site%3Aruby-doc.org%2Fcore-1.... There's the documentation for the Array class, but you can't get to it from the 1.9 core documentation: http://ruby-doc.org/core-1.9/index.html http://ruby-doc.org/core-1.9/index.html
- Tichy 17y agoI think that is only core, though, not the standard lib. It started for me with hearing the rumor that JSON would be part of the standard lib of Ruby 1.9. I was unable to confirm that online. Eventually I peeked into the "Programming Ruby" book in a bookshop and thus was able to confirm that Ruby 1.9.1 indeed comes with JSON.
- carbon8 17y agoruby-doc really should have this. Maybe if jamesbritt sees these comments he can let us know what's up. Here's a decent source for ruby 1.9 docs, though: http://railsapi.com/doc/ruby-v1.9/ http://railsapi.com/doc/ruby-v1.9/
- jballanc 17y agoAll the documentation you could ever want on 1.8.6, 1.8.7, 1.9.1, and every gem on RubyForge all in one place: http://rubydoc.ruby-forum.com/ http://rubydoc.ruby-forum.com/ Ta-da!
- Tichy 17y agoI don't think it has the standard library of Ruby 1.9.1
- jballanc 17y agoIt was all there last time I checked. Is there a specific class you're missing?
- Tichy 17y agoJSON was my "benchmark" - it is supposed to be part of the 1.9.1 standard lib. I know it is also a gem and as such the documentation for JSON can be found. But I would kind of like to have the official 1.9.1 standard library. Also because some things changed from 1.8
- jballanc 17y agoHmm...not sure exactly what's going on with JSON, but it appears that an older version (1.1.4) is included in the trunk repo but not built by default. At any rate, under the "Gem" section of that site there is documentation for 1.1.4 as well as the newer 1.1.6.
- RyanMcGreal 17y ago`sudo make install` AFAIK if you enter `sudo checkinstall` instead, it installs into your package manager so you can remove it more easily later. https://help.ubuntu.com/community/CheckInstall https://help.ubuntu.com/community/CheckInstall
- plaes 17y agoUgh, I am sick of seeing those 'sudo make install' howtos potentially messing with system :S The one powerful feature of Linux distributions is the package management. Every file that you have installed on your filesystem is accounted for... And now I'm left wondering how this guy updates to next (major) ruby version :P
- ionfish 17y agoThis is fine if the package maintainers are relatively up-to-date with the software you require, but often they aren't. Ubuntu Hardy's version of Ruby 1.9 is pretty outdated and thus probably doesn't include, amongst other things, some rather vital security fixes. Don't get me wrong—I'm all in favour of package managers. Sometimes, however, they aren't sufficient.
- RyanMcGreal 17y agoBut checkinstall (rather than make install) still uses the up-to-date source files. It just allows your package manager to remove the application when you're done with it (e.g. when you're ready to upgrade to a sill-newer version).
- plaes 17y agoYeah, but there's also a possibility to create a package yourself (or use this checkinstall)
- codahale 17y agoExactly. First, check http://svn.debian.org/wsvn/ http://svn.debian.org/wsvn/ for the package you're lusting after. (In this case, pkg-ruby has the ruby1.9.1 package at 1.9.1.243-2 on trunk.) Then, use svn-buildpackage to build yourself the damn package. Finally, install the package, basking in the warmth of replicable, reversible package management.
- Andys 17y agoI switched to 1.9 for several greenfields projects. The postgresql gem builds cleanly, as does thin, which can be used in place of mongrel. The biggest gotcha was having to modify my application to explicitly open text files in UTF8 mode. But the more than 100% execution speedup was a nice upside.