MacRuby
February 28th, 2008
Apple has just released a development version of MacRuby, Ruby 1.9 built on top of Objective-C. This is very interesting, and is only the second ever Apple language that will have Cocoa support built in from the ground up.
Also, it includes keyword argument support, something missing from current Ruby implementations. It will be interesting to see if this is the first alternate Ruby implementation that will truly fork from the C-based Ruby language. I really hope that it doesn’t end up becoming so.
I’d recommend modifying the Apple installation instructions (adding a directory in your home folder, and then just editing the configure line), like so:
mkdir -p ~/macruby
./configure --enable-shared \
--prefix=/Users/[username]/macruby \
--program-prefix=mac
That way ‘ruby’ still points to the current production quality Ruby 1.8.6 installed with Leopard, no gem folders are stepped on, and you can access MacRuby via ‘macruby’, ‘macirb’, etc, if you add the macruby’s bin folder to your path.
January: Month of Ruby 1.9
January 10th, 2008
[UPDATE: I’ve been terribly sick the last week so this series is delayed a bit, sorry!]
In January I’ll be running a series of posts – one each weekday – highlighting a new feature or change in Ruby 1.9, which had a developer release on Christmas Day. While Ruby 1.9 should not yet be used in production, it is now the perfect time to install it alongside 1.8 and get your hands dirty.
Getting Ruby 1.9
On a Linux/Unix/Mac installation should be straightforward if you are used to compiling packages.
Download:
mkdir ~/src
cd ~/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
# or curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
tar xzvf ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
Install:
cd ruby1.9.0-0
autoconf
./configure --prefix=/usr/local --program-suffix=19
make
sudo make install
Now in addition to ruby, irb, and ri you should have available to you ruby19, irb19, and ri19.
Start up irb19 and check the ruby version:
jlindley$ irb19
>> RUBY_VERSION
=> "1.9.0"
Don’t expect to be able to run Rails and all your usual programs as normal, there is still a lot of work going on updating Rails and other gems to be 1.9 compatible. This release breaks some old things, but going forward 2.0 and further should all be compatible with 1.9. This is the painful release.
So, install 1.9 and check back on January 1st for the first entry in this series. In the meantime, a summary of changes in 1.9 can (sometimes) be found at Eigenclass.org.
Series Index
This section will be updated with links as the month progresses, but an outline of topics is:
Week 1
- Jan 1 – Deprecations and Porting Concerns
- Jan 2 – RubyGems
- Jan 3 – Rake
[UPDATE: I’ve been terribly sick the last week so this series is delayed a bit, sorry!]
Rails 2.0 Released
December 7th, 2007
Just saw it was tagged in the Rails dev subversion repository. Long time coming but definitely worth it, I’ve been running on edge for 6 months now and Rails 1.2 is hard to go back to when I need to work on older projects.
Official announcement and an overview of changes.
Rails 2.0 Installation
The actual release version is 2.0.1, 2.0.0 had a small issue. EDIT 12/16: the latest version is now 2.0.2. To install it as a gem:
sudo gem install rails
Or inside an existing Rails project:
rake rails:freeze:edge TAG=rel_2-0-2
rake rails:update
Online Resources:
- Rails change log (will be slow today, it’s on the main dev site)
- New Feature Overview
- Free screen casts on Rails 2.0
- Ryan Daigle’s edge Rails posts
- Rails 2.0 PDF ($9)
- Foxy Fixtures (managing inter-related fixtures just got easier)
- Handling deprecations when upgrading to Rails 2.0
- Prototype 1.6C Changes
- Scriptaculous 1.8 Changes
Books with Rails 2 content:
Rails 2.0 RC 2 Released
November 29th, 2007
It looks like we are a week away from the actual 2.0 release, you can check out the preview release by pulling from the gem from the Rails dev server, or freezing to edge in your project like so:
rake rails:freeze:edge TAG=rel_2-0-0_RC2
Remember, upgrade to the latest version of 1.2.x (1.2.6 at the moment), and check for any deprecation warnings before trying to run 2.0, unless you’ve been running on edge lately.
This release candidate contains many bug fixes but minimal new features over the last release candidate.
Rails 2.0 Release Candidate
November 9th, 2007
A release candidate for Rails 2.0 has been tagged - see announcement of install directions and other news.
Prototype 1.6 and Script.aculo.us 1.8
November 7th, 2007
The javascript libraries included with Rails have been bumped up to the latest release versions of each: Prototype 1.6 and Script.acul.ous 1.8. It looks like these are the versions that will make it into the final Rails 2.0 release.
Merb 0.4.0
November 7th, 2007
If you’re looking for a lighter-weight web development framework then Rails, this is Merb is the place to be.
Merb has just released 0.4.0, a release which came about after much love at RubyConf last week. There is now an official Merb site, Merbivore. Check out the list of new features.
Leopard and Ruby (DTrace!)
October 25th, 2007
Leopard (Mac OS X 10.5) comes out tomorrow, and here is a list of what that means for the system’s included Ruby from the folks at Apple’s Mac OS Forge.
Nice irb support, and Ruby updated to 1.8.6, Rails 1.2.3, and Mongrel 1.0.1.
The only thing in the list given that surprised me was that the default Ruby install includes DTrace probes. The Ruby DTrace probe patches are based on Joyent’s work on Ruby for Solaris. This is a great way to look inside your app and see what’s really going.
Instruments is the name of the program you use to see what’s going on via the DTrace probes, new in Leopard. Some DTrace examples with Ruby are on the Joyent site (just hit cancel when asked for authorization), and some more examples in /Developer/Examples/Ruby/DTrace in your Leopard install.
UPDATE: Additional info on DTrace in Leopard. If you know of any more sites with detailed info or instructions, please leave a comment and I’ll add to this list.
Scriptaculous 1.8 Preview
October 15th, 2007
A preview release for Script.acul.ous 1.8 is out, it uses Prototype 1.6.
Rails 1.2.5
October 15th, 2007
I was away this weekend, so this is old news by now, but Rails 1.2.5 is out. It fixes several bugs and security issues, and is a recommended update for all 1.2.x users.
(quoting from the announcement):
To upgrade:
gem install rails
Set RAILSGEMVERSION to ‘1.2.5’ in config/environment.rb, and run:
rake rails:update:configs
Rails 1.2.4 Maintenance Release
October 5th, 2007
Official Rails 1.2.4 Announcement, this release includes a few bug fixes and also helps prep the way for an upgrade to Rails 2.0. If you move from 1.2.3 to 1.2.4, you’ll see deprecation warnings for many of the things that are not present / different in 2.0.
Database Adapter Gem Location
October 1st, 2007
DB Adapter Gem status for ActiveRecord announcement on the Rails Blog. Only MySQL, SQLite and PostgreSQL adapters are included in the default Rails 2.0 distribution.
Other adapters can be installed by calling:
gem install adapter-name
The available ones are:
activerecord-firebird-adapter
activerecord-frontbase-adapter
activerecord-openbase-adapter
activerecord-oracle-adapter
activerecord-sqlserver-adapter
activerecord-sybase-adapter
Rails 2 Preview Release
September 30th, 2007
A Rails 2.0 RC has been tagged. Changeset #7702
To use it in your app, use this rake task:
rake rails:freeze:edge TAG=rel_2-0-0_PR
And try it out. There will be a Rails 1.2.4 release soon that will contain additional deprecation warnings for 2.0, so if you don't have time to jump right in, wait for that first and you'll have a friendlier face on your update process.
Also, check out the official Rails 2 Preview Release announcement, which contains a run down of all the major changes from 1.2 to 2.0.
Rails 2 Preview Release Soon?
September 18th, 2007
According to DHH’s EU RailsConf keynote, a preview release of Rails 2 may be coming out shortly.
Prototype 1.6 Release Candidate
August 16th, 2007
Prototype 1.6 RC1 is out, if you’d like to give it a try. Check out the change log at the link above, looks like it’s all really good stuff.