MacRuby,使用 Sequel 时出错

发布于 2024-10-05 22:00:56 字数 1025 浏览 12 评论 0原文

我刚刚使用命令 sudo macgem install Sequel 安装了 Sequel。它告诉我sequel-3.18.0 已成功安装。

当我启动 xcode 并启动一个新的 MacRuby 应用程序时,它会设置单元测试的目标。我用以下两行修改了stub_test.rb:

require "rubygems"
require "sequel"

当尝试运行单元测试时,出现以下错误:

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

没有两个require语句,测试运行良好。

我尝试用 google 搜索此内容,并在 macruby.org 上找到了以下票证

票#930 MacRuby 0.7 中的 SIGABRT 与 Sequel + SQLite3-Ruby gem [...] 修补 Sequel 中的 Kernel#require 问题后,我可以毫无问题地加载 Sequel 和 SQLite3。 [...] 所需的库是 Sequel(为 Kernel.require 打了补丁,而不是 Sequel#self.require 中的 super)和 SQLite3-Ruby。 [...]

不过,我在其他地方找不到有关此补丁的任何信息...

有任何已知问题吗? 此错误消息是什么意思,以及如何让它发挥作用?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

早茶月光 2024-10-12 22:00:56

您运行什么版本的 MacRuby?另外,你运行的是 32 位 Mac 吗?

在我的环境中,运行 MacRuby trunk 的 64 位 Intel mac,我能够安装并要求续集。

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

正如 Eloy 所说,最好将 MacRuby 问题报告给我们的邮件列表或票务追踪。 http://www.macruby.org/contact-us.html

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

美人如玉 2024-10-12 22:00:56

MacRuby(如 IronRuby)目前没有实现足够的 Ruby 语言来与 Sequel 配合使用。 Sequel 在 MRI(1.8 和 1.9)、JRuby 和 Rubinius 上进行了测试,因此您可以尝试其中之一。

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.

调妓 2024-10-12 22:00:56

我遇到了类似问题,并能够使用以下组合使其工作:

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

技巧是卸载“sqlite3”gem 并安装“sqlite3-ruby”。

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'.

温柔戏命师 2024-10-12 22:00:56

由于 MacRuby 仍处于大力开发阶段,我认为如果您在 MacRuby-devel 邮件列表上提出这个问题会更好。知道如何让 Sequel 在 MacRuby 上工作的人(我知道人们已经这样做了)也在那里。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文