Projects

Ticket #78 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

using rake => ./rbconfig.rb:7: ruby lib version (1.9.0) doesn't match executable version (1.8.6) (RuntimeError)

Reported by: stephen.bannasch@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.3
Component: MacRuby Keywords:
Cc:

Description

$ svn info
Path: .
URL: http://svn.macosforge.org/repository/ruby/MacRuby/branches/testing
Repository Root: http://svn.macosforge.org/repository/ruby
Repository UUID: 23306eb0-4c56-4727-a40e-e92c0eb68959
Revision: 295
Node Kind: directory
Schedule: normal
Last Changed Author: lsansonetti@apple.com
Last Changed Rev: 295
Last Changed Date: 2008-06-16 21:04:32 -0400 (Mon, 16 Jun 2008)

[src-branch-testing]$ rake
(in /Users/stephen/dev/macruby/src-branch-testing)
/usr/bin/ruby -I. tool/compile_prelude.rb prelude.rb miniprelude.c.new
./rbconfig.rb:7: ruby lib version (1.9.0) doesn't match executable version (1.8.6) (RuntimeError)
	from /Library/Ruby/Site/1.8/rubygems.rb:60:in `require'
	from /Library/Ruby/Site/1.8/rubygems.rb:60
	from /Library/Ruby/Site/1.8/ubygems.rb:10:in `require'
	from /Library/Ruby/Site/1.8/ubygems.rb:10
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I. tool/compile_prelude.rb ...]
/Users/stephen/dev/macruby/src-branch-testing/rakefile:215
(See full trace by running task with --trace)

Change History

Changed 4 years ago by stephen.bannasch@…

It seems that the build script in the Rakefile requires ruby 1.9 to operate.

I was able to build macruby successfully by replacing the three locations in the Rakefile where the path to a ruby executable is specified like this:

/usr/bin/ruby

with the path to a recent (revision 17368) ruby 1.9 binary on my system:

/Users/stephen/dev/ruby1.9/bin/ruby19

On my MacOS 10.5.3 system:

/usr/bin/ruby -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby

It would be nice to be able to build macruby without having 1.9 installed.

Changed 4 years ago by lsansonetti@…

It should definitely build with 1.8 Ruby. I think it failed because you upgraded from an existing testing branch, if you start from a fresh clean branch it should work. (It's clearly a bug in the Rakefile.)

For example, does the following line work for you?

$ /usr/bin/ruby tool/compile_prelude.rb prelude.rb miniprelude.c.new

(Notice that -I. is not passed anymore.)

Changed 4 years ago by stephen.bannasch@…

On a fresh checkout in a new dir rake and rake install work however I get the same error when running rake a second time.

Here are the steps (the dir src does not exist at the start):

svn co http://svn.macosforge.org/repository/ruby/MacRuby/branches/testing src
cd src
rake
sudo rake install
rake
(in /Users/stephen/dev/macruby/src)
/usr/bin/ruby -I. tool/compile_prelude.rb prelude.rb miniprelude.c.new
./rbconfig.rb:6: ruby lib version (1.9.0) doesn't match executable version (1.8.6) (RuntimeError)
	from /Library/Ruby/Site/1.8/rubygems.rb:60:in `require'
	from /Library/Ruby/Site/1.8/rubygems.rb:60
	from /Library/Ruby/Site/1.8/ubygems.rb:10:in `require'
	from /Library/Ruby/Site/1.8/ubygems.rb:10
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I. tool/compile_prelude.rb ...]
/Users/stephen/dev/macruby/src/rakefile:215
(See full trace by running task with --trace)

The same problem exists even if I run rake clean or rake clean:ext before running rake.

Changed 4 years ago by stephen.bannasch@…

Running:

/usr/bin/ruby tool/compile_prelude.rb prelude.rb miniprelude.c.new

does work.

Changed 4 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.3

Thanks for the verification, I committed the Rakefile fix as r296/trunk, and also to the testing branch.

Note: See TracTickets for help on using tickets.