Hacker News new | comments | show | ask | jobs | submit login
Experience Switching From Ruby 1.8 to Ruby 1.9 (extralogical.net)
32 points by mudge on Aug 24, 2009 | hide | past | web | favorite | 18 comments



`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


Ugh, 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


Exactly.

First, check 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.


This 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.


But 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).


Yeah, but there's also a possibility to create a package yourself (or use this checkinstall)


I 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.


I 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).


Yeah, 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....

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


I 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.


ruby-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/


All 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/

Ta-da!


I don't think it has the standard library of Ruby 1.9.1


It was all there last time I checked. Is there a specific class you're missing?


JSON 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


Hmm...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.


I thought http://www.ruby-doc.org has docs for the 1.9 library (also for the 1.8.7 and 1.8.6)


They only have docs for core, not for the standard library.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: