如何在Mac雪豹中安装sqlite3的ruby界面?

发布于 2024-09-29 02:08:35 字数 858 浏览 3 评论 0原文

我尝试按如下方式安装它,但它抛出错误:-

"sudo gem install sqlite3-ruby"
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/ Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out  

有关我的系统的一些信息:-

ruby​​ -v 1.8.7
Rails-v 3.0.1
宝石-v 1.3.7
sqlite3 --version 3.6.12

另外如何检查我的系统中是否安装了 sqlite3 的 ruby​​ 接口?
就像我们“rails-v”来检查我们的系统中是否安装了rails一样。我没有在网络上找到任何命令来检查我的系统中是否安装了sqlite3的ruby-interface?

I tried to install it as below but it throws error :-

"sudo gem install sqlite3-ruby"
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/ Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out  

Some information about my system:-

ruby -v 1.8.7
rails -v 3.0.1
gem -v 1.3.7
sqlite3 --version 3.6.12

Also how to even check if the ruby interface for sqlite3 is installed in my system?
Like we "rails-v" to check if rails is installed in our system.I didn't find any commands over the web to check if ruby-interface for sqlite3 is installed in my system ?

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

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

发布评论

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

评论(2

ゞ花落谁相伴 2024-10-06 02:08:35

为了在 OS X 上编译本机代码(例如本机 Ruby 扩展),您必须安装 Apple XCode。

XCode 包含各种开发人员工具,例如 clang 编译器和开发头文件(ruby.h 等)。

App Store 上提供了最新版本的 XCode。尽管默认情况下,XCode 不再以可从 shell 访问的方式安装开发人员工具,但您可以通过从 XCode IDE 首选项的“下载”选项卡下安装“命令行工具”来解决此问题窗户。

有关更多详细信息,请参阅此其他答案

In order to compile native code on OS X (such as this native Ruby extension) you have to install Apple XCode.

XCode includes various developer tools such as the clang compiler and development header files (ruby.h among others).

Recent version of XCode are available on the App Store. Although by default, XCode no longer installs the developers tools in a way that makes them accessible from the shell, you can fix that by installing "Command Line Tools" from under the Download tab of the XCode IDE preference window.

See this other answer for more details.

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