Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

You are here: Home / Ruby / Ruby 1.9 Released – Should you use it today?

Ruby 1.9 Released – Should you use it today?

December 30, 2007 by Rob Bazinet

Tweet

Ruby Logo

Ruby 1.9 was released on Christmas, announced on the Ruby web site. Matz made the announcement we all expected, as Matz seems to enjoy giving all the Rubyists a nice Christmas present.

Many developers probably were anxious for the release and wanted to download it, get it setup and start using their Ruby or Rails applications with some new found speed improvements. Anyone who has been around the computer industry for any amount of time knows it is rarely easy just to take a new release of a programming language and just use it with existing code or framework.

Dave Thomas has some nice insight on the topic of using Ruby 1.9 and whether it is right for you.

The Good:

  • Performance: this new Ruby runs on the new YARV virtual machine. For most compute-intensive applications, you’ll see significant speed improvements.
  • Support for string encodings and transcoding. Every string in Ruby can now have an associated encoding (ASCII, UTF-8, SJIS, and so on). You can transcode the contents of a string (for example converting ISO-8859-1 to UTF-8).
  • Integrated RubyGems and rake
  • Cool new goodies such as Fibers

The Bad:

  • This is a development release, not a production release. It has known bugs, and there’ll be more to come.
  • It contains several incompatible changes (block parameters are now block-local, String is no longer Enumerable, “cat”[1] now returns “a”, rather than 65)
  • It is more rigorous that 1.8 when it comes to detecting invalid code. For example, 1.8 accepts /[^\x00-\xa0]/u, while 1.9 complains of invalid multibyte escapes

Some of the things Rails developers expect today is that things normally just work and we take a lot for granted. Many of the existing gems and libraries do not work with Ruby 1.9, this includes Rails 2.0.2. Users have reported creating a new Rails application does not work property.

What’s the purpose of Ruby 1.9 then?

Well, it’s a development release so how about use it for development? This means developers who have created gems or libraries for Ruby should be taking advantage of this early release and get their products to work with 1.9.

It is also made available for hard-core Ruby developers to learn what’s new and how to use the new features, to play around with now. This does not mean you should be using it for production code, there are known bugs and there will be more found.

Users should install Ruby 1.9 as a secondary Ruby install, not an install over the top of your production Ruby 1.8.x or whatever. Dave Thomas gives a nice tutorial on the subject:

$ autoconf $ ./configure --prefix=/Users/dave/ruby19 $ make $ make install Then, I just add /Users/dave/ruby19/bin to my path, and I'm using my nicely sandboxed version of Ruby 1.9. $ PATH=/Users/dave/ruby19/bin:$PATH$ ruby -v ruby 1.9.0 (2007-12-26 revision 0) [i686-darwin8.11.1]

This method will give you a sandbox or Ruby 1.9 to write code with and explore.

So, should it be used today?

The answer is yes and no. Yes, so you can play around with it, get to know it and update your libraries or gems if you maintain any. The other side of the argument is that you should not expect to use it for production code, it’s not meant for that today.

Ruby has come a long way and the future is bright. The performance improvements alone is reason enough to want to get it and learn it.

Technorati Tags: Ruby on Rails,Ruby

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Related

Filed Under: Ruby

Care about your privacy? I do and use Fathom Analytics on this site.

Fathom Analytics

Comments

  1. Building Ruby 1.9.0 on an Apple Mac « Accidental Technologist says

    December 31, 2007 at 2:14 pm

    […] Ruby 1.9 Released – Should you use it today? […]

  2. Building Ruby 1.9.0 on an Appl says

    December 31, 2007 at 2:14 pm

    […] Ruby 1.9 Released – Should you use it today? […]

Recent Posts

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet (ruby.social/@rbazinet)
@rbazinet

  • Working to wrap up my current consulting gig by mid-April. I will be looking for the next thing soon. If anyone has… https://t.co/sg3cSV9yqM
    about 6 hours ago
  • I’ve been spending some time using Notion AI lately and it surprisingly good. Since all the rage lately is ChatGPT,… https://t.co/cUXFWIRCVV
    about 3 days ago
  • I think these steps are true for any target audience. https://t.co/0ht6rIzOW3
    about 3 days ago
  • I’ve been enjoying a show from the Magnolia network called The Craftsman. It’s mainly about woodworking but his phi… https://t.co/sWTUBbSsl6
    about 3 days ago
  • I found the resource I was looking for last night that is similar to https://t.co/Pyn0IIjRdP, it is… https://t.co/U7TMe77FMF
    about 3 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon