1

I have just installed Sequel using the command sudo macgem install sequel. It tells me sequel-3.18.0 was successfully installed.

When I fire up xcode, and start a new MacRuby application, it sets up a target for unit tests. I have modified stub_test.rb with the following two lines:

require "rubygems"
require "sequel"

When trying to run the unit tests, I get the following error:

/Users/.../macRuby Test/Tests/run_suite.rb:1:in `<main>': super: no superclass method `require' for Sequel:Class (NoMethodError)

Without the two require statements, the tests run fine.

I have tried to google this, and found the following ticket on macruby.org:

Ticket #930 SIGABRT in MacRuby 0.7 with Sequel + SQLite3-Ruby gem [...] After patching for Kernel#require issue in Sequel, I am able to load both Sequel, and SQLite3, with no problems. [...] Required libraries are Sequel (Patched for Kernel.require, instead of super in Sequel#self.require), and SQLite3-Ruby. [...]

I can't find anything about this patch anywhere else, though...

Is there any known issue? What does this error message mean, and how I can get this to work?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Vegar
  • 12,828
  • 16
  • 85
  • 151

4 Answers4

2

What version of MacRuby do you run? Also, do you run a 32-bit Mac?

In my environment, 64-bit Intel mac running MacRuby trunk, I am able to install and require sequel.

$ /usr/local/bin/macruby -r rubygems -e "require 'sequel'; p 42"
42

As Eloy said, it is better to report MacRuby problems to our mailing-list or ticket trac instead. http://www.macruby.org/contact-us.html

lrz
  • 106
  • 1
  • I using macruby 0.7 (latest stable release) on a late 2009 intel macbook pro. I will try out latest build. – Vegar Dec 03 '10 at 11:26
  • The last build got me one step further, thanks. Still not working, though, but I think maybe its an sqlite problem not an sequel problem. – Vegar Dec 03 '10 at 12:18
  • Guess I had the wrong sqlite-gem installed. By uninstalling sqlite3 and installing sqlite3-ruby, things start to look good :-) – Vegar Dec 03 '10 at 12:26
1

MacRuby (like IronRuby) currently doesn't implement enough of the ruby language to work with Sequel. Sequel is tested on MRI (1.8 and 1.9), JRuby, and Rubinius, so you could try one of them.

Jeremy Evans
  • 11,959
  • 27
  • 26
  • I'm looking for a convenient way of storing data in a macruby application, not a convenient interpreter that would run sequel, so I guess I have to look somewhere else... Too bad. Sequel looks great! – Vegar Dec 03 '10 at 08:29
  • I'd downvote given that other answers indicate that it does work on MacRuby, but I figure you would know if it does/doesn't work. – Phrogz Dec 05 '10 at 05:46
  • By work I mean pass all of the specs. If macruby has not yet implemented correct superclass method lookup, it's not going to work perfectly with Sequel. It doesn't surprise me that some parts of Sequel work in macruby. Some parts of Sequel work in IronRuby too. But I wouldn't rely on Sequel's behavior in the current version of either. – Jeremy Evans Dec 06 '10 at 18:10
1

I ran into similar issues and was able to get it working with the following combination:

MacRuby 0.8
sqlite3-ruby gem 1.3.2
sequel gem 3.18.0
OSX 10.6.5

The trick was uninstalling the 'sqlite3' gem and installing 'sqlite3-ruby'.

Community
  • 1
  • 1
Stephen Petschulat
  • 1,159
  • 2
  • 14
  • 23
  • This combination let me require the sequel gem, but as soon as i start to use it, I get a segmentation fault... – Vegar Dec 20 '10 at 09:49
  • Did you uninstall the 'sqlite3' gem? I've been able to create dbs, tables, query, etc. with this combo, but it segfaults with the old gem. You might also want to try deleting your gem cache in ~/.gem/. Edit: nevermind, just saw your response in another answer. – Stephen Petschulat Dec 20 '10 at 19:29
0

Since MacRuby is still in heavy development, I think it would be better if you would ask this question on the MacRuby-devel mailinglist. The people that know how to get Sequel to work on MacRuby (I know people have done so) are there too.

alloy
  • 20,908
  • 2
  • 30
  • 40