small medium large xlarge

20 Jun 2010, 13:59
Travis Chase (1 post)

I am just starting to go through the iterations and have used RVM on Mac OS X Snow Leopard to install ruby 1.9.1 and rails 3 beta 4. I am on iteration A2 and tried to run tests, as well as, rake db:seed and both fail with: undefined method <=>' for class ActiveSupport::Multibyte::Chars’

Any thoughts?

20 Jun 2010, 18:24
Sam Ruby (634 posts)

Starting with Rails 3.0 beta 2, 1.9.1 has been problematic. The expectation is that with the final release, only 1.8.7 and 1.9.2 will be supported. I would strongly recommend updating to 1.9.2-preview3. With the latest rvm, this is as easy as rvm install 1.9.2. I’m also having good results with the head of the 1.9.2 release (currently 1.9.2-r28360).

Paul - neko head shot_pragsmall
10 Jul 2010, 03:43
Paul Fioravanti (13 posts)

Slightly related to the issue discussed here but definitely related to seeding multilingual data, using RVM with ruby-1.9.2 and rails 3.0 beta 4, I was getting @invalid multibyte char (US-ASCII)@ errors using @rake db:seed@ when I was trying to seed non-ascii (in my case Japanese language) data. By adding a @# encoding: utf-8@ statement to the top of my @db/seeds.rb@ file, I was able to fix this problem and get Japanese data seeded properly.

11 Jul 2010, 16:35
Sam Ruby (634 posts)

While an encoding declaration is not necessary for the example provided in the book, I do agree that it is a good thing to include, so I’ll add such a declaration to the downloadable seeds.rb file the next time a beta is posted.

Thanks for the suggestion!

20 Jul 2010, 14:16
Bharat Ruparel (148 posts)

Sam, Will you please post detailed instructions on using RVM with Rails? I am on Ubuntu Linux 10.04 and RVM just creates a mess for me. Thanks. Bharat

20 Jul 2010, 15:13
Scott Lowe (1 post)

I can confirm that 1.9.2-head (as of time of writing) works fine with the book code on Mac OS X Snow Leopard with RVM and Rails 3 beta 4.

20 Jul 2010, 15:47
Sam Ruby (634 posts)


While I use rvm, my experience is that it is changing rapidly, and that the half-life for installation instructions is short. I just tried the following, and it worked for me:

sudo apt-get install build-essential bison openssl libreadline5 curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libreadline5-dev libxml2-dev git-core subversion autocon
bash < <( curl )

Add to .bashrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

And then in a new session:

rvm install 1.8.7
rvm 1.8.7
gem install rails --pre
gem install sqlite3-ruby

I’m told that it is best to install rvm 1.8.7 prior to installing another Ruby release (e.g. 1.9.2)

You must be logged in to comment