Hacker Newsnew | comments | ask | jobs | submitlogin
Experience Switching From Ruby 1.8 to Ruby 1.9 (extralogical.net)
32 points by mudge 339 days ago | comments


6 points by RyanMcGreal 339 days ago | link

`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

-----

3 points by plaes 339 days ago | link

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

-----

4 points by codahale 339 days ago | link

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.

-----

1 point by ionfish 339 days ago | link

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.

-----

1 point by RyanMcGreal 339 days ago | link

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

-----

1 point by plaes 339 days ago | link

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

-----

4 points by Andys 339 days ago | link

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.

-----

3 points by Tichy 339 days ago | link

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

-----

2 points by ionfish 339 days ago | link

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

-----

1 point by Tichy 339 days ago | link

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.

-----

2 points by carbon8 339 days ago | link

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/

-----

1 point by jballanc 339 days ago | link

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!

-----

1 point by Tichy 339 days ago | link

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

-----

1 point by jballanc 339 days ago | link

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

-----

2 points by Tichy 338 days ago | link

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

-----

2 points by jballanc 338 days ago | link

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.

-----

1 point by nudded 339 days ago | link

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

-----

1 point by Tichy 339 days ago | link

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

-----




Lists | RSS | Search | Bookmarklet | Guidelines | FAQ | News News | Feature Requests | Y Combinator | Apply | Library

Analytics by Mixpanel