gem update sqlite3-ruby在Mac OS X 10.5.8上失败

时间:2009-10-21 23:44:50

标签: ruby-on-rails macos sqlite

我试图在运行OS X 10.5.8的Mac上获取最新的ruby on rails。一切顺利,直到我尝试更新sqlite3-ruby。我看到其他人遇到了类似的问题,但是他们在Windows上。

这是错误:

sudo gem update sqlite3-ruby Updating installed gems Updating 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 can't find header files for ruby.


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

以下是我执行的步骤:

 sudo gem update --system
 sudo gem install rails
 sudo gem update rake
 sudo gem update sqlite3-ruby

以下是完整的跟踪:

paul-chernochs-imac-5:~ paulchernoch$ sudo gem update --system

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.3.5
1 gem installed
Installing ri documentation for rubygems-update-1.3.5...
Installing RDoc documentation for rubygems-update-1.3.5...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
Updating version of RubyGems to 1.3.5
Installing RubyGems 1.3.5
RubyGems 1.3.5 installed

=== 1.3.5 / 2009-07-21

Bug fixes:

* Fix use of prerelease gems.
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.

Deprecation Notices:

* Bulk index update is no longer supported (the code currently remains, but not
  the tests)
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.


------------------------------------------------------------------------------

RubyGems installed the following executables:
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem

RubyGems system software updated
paul-chernochs-imac-5:~ paulchernoch$ sudo gem install rails
Password:
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.4
Successfully installed activerecord-2.3.4
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.4
Successfully installed actionmailer-2.3.4
Successfully installed activeresource-2.3.4
Successfully installed rails-2.3.4
8 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.4...
Installing ri documentation for activerecord-2.3.4...
Installing ri documentation for rack-1.0.1...
Installing ri documentation for actionpack-2.3.4...
Installing ri documentation for actionmailer-2.3.4...
Installing ri documentation for activeresource-2.3.4...
Installing ri documentation for rails-2.3.4...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.4...
Installing RDoc documentation for activerecord-2.3.4...
Installing RDoc documentation for rack-1.0.1...
Installing RDoc documentation for actionpack-2.3.4...
Installing RDoc documentation for actionmailer-2.3.4...
Installing RDoc documentation for activeresource-2.3.4...
Installing RDoc documentation for rails-2.3.4...
paul-chernochs-imac-5:~ paulchernoch$ sudo gem update rake
Updating installed gems
Nothing to update
paul-chernochs-imac-5:~ paulchernoch$ sudo gem update sqlite3-ruby
Updating installed gems
Updating 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
can't find header files for ruby.


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

我下载了Xcode 3.1.4并安装了它。现在我报告了不同的错误:

    paul-chernochs-imac-5:~ paulchernoch$ sudo gem update sqlite3-ruby
    Password:
    Updating installed gems
    Updating sqlite3-ruby
    Building native extensions.  This could take a while...
    Successfully installed sqlite3-ruby-1.2.5
    Gems updated: sqlite3-ruby
    Installing ri documentation for sqlite3-ruby-1.2.5...

    No definition for _wrap_new_CallbackData

    No definition for _wrap_CallbackData_proc_set

    No definition for _wrap_CallbackData_proc_get

    No definition for _wrap_CallbackData_proc2_set

    No definition for _wrap_CallbackData_proc2_get

    No definition for _wrap_CallbackData_data_set

    No definition for _wrap_CallbackData_data_get

    No definition for _wrap_sqlite3_libversion

    No definition for _wrap_sqlite3_close

    No definition for _wrap_sqlite3_last_insert_rowid

    No definition for _wrap_sqlite3_changes

    No definition for _wrap_sqlite3_total_changes

    No definition for _wrap_sqlite3_interrupt

    No definition for _wrap_sqlite3_complete

    No definition for _wrap_sqlite3_complete16

    No definition for _wrap_sqlite3_busy_handler

    No definition for _wrap_sqlite3_busy_timeout

    No definition for _wrap_sqlite3_set_authorizer

    No definition for _wrap_sqlite3_trace

    No definition for _wrap_sqlite3_open

    No definition for _wrap_sqlite3_open16

    No definition for _wrap_sqlite3_errcode

    No definition for _wrap_sqlite3_errmsg

    No definition for _wrap_sqlite3_errmsg16

    No definition for _wrap_sqlite3_prepare

    No definition for _wrap_sqlite3_prepare16

    No definition for _wrap_sqlite3_bind_blob

    No definition for _wrap_sqlite3_bind_double

    No definition for _wrap_sqlite3_bind_int

    No definition for _wrap_sqlite3_bind_int64

    No definition for _wrap_sqlite3_bind_null

    No definition for _wrap_sqlite3_bind_text

    No definition for _wrap_sqlite3_bind_text16

    No definition for _wrap_sqlite3_bind_parameter_count

    No definition for _wrap_sqlite3_bind_parameter_name

    No definition for _wrap_sqlite3_bind_parameter_index

    No definition for _wrap_sqlite3_column_count

    No definition for _wrap_sqlite3_column_name

    No definition for _wrap_sqlite3_column_name16

    No definition for _wrap_sqlite3_column_decltype

    No definition for _wrap_sqlite3_column_decltype16

    No definition for _wrap_sqlite3_step

    No definition for _wrap_sqlite3_data_count

    No definition for _wrap_sqlite3_column_blob

    No definition for _wrap_sqlite3_column_bytes

    No definition for _wrap_sqlite3_column_bytes16

    No definition for _wrap_sqlite3_column_double

    No definition for _wrap_sqlite3_column_int

    No definition for _wrap_sqlite3_column_int64

    No definition for _wrap_sqlite3_column_text

    No definition for _wrap_sqlite3_column_text16

    No definition for _wrap_sqlite3_column_type

    No definition for _wrap_sqlite3_finalize

    No definition for _wrap_sqlite3_reset

    No definition for _wrap_sqlite3_create_function

    No definition for _wrap_sqlite3_create_function16

    No definition for _wrap_sqlite3_aggregate_count

    No definition for _wrap_sqlite3_value_blob

    No definition for _wrap_sqlite3_value_bytes

    No definition for _wrap_sqlite3_value_bytes16

    No definition for _wrap_sqlite3_value_double

    No definition for _wrap_sqlite3_value_int

    No definition for _wrap_sqlite3_value_int64

    No definition for _wrap_sqlite3_value_text

    No definition for _wrap_sqlite3_value_text16

    No definition for _wrap_sqlite3_value_text16le

    No definition for _wrap_sqlite3_value_text16be

    No definition for _wrap_sqlite3_value_type

    No definition for _wrap_sqlite3_result_blob

    No definition for _wrap_sqlite3_result_double

    No definition for _wrap_sqlite3_result_error

    No definition for _wrap_sqlite3_result_error16

    No definition for _wrap_sqlite3_result_int

    No definition for _wrap_sqlite3_result_int64

    No definition for _wrap_sqlite3_result_text

    No definition for _wrap_sqlite3_result_text16

    No definition for _wrap_sqlite3_result_text16le

    No definition for _wrap_sqlite3_result_text16be

    No definition for _wrap_sqlite3_result_value

    No definition for _wrap_sqlite3_aggregate_context
    Installing RDoc documentation for sqlite3-ruby-1.2.5...

    No definition for _wrap_new_CallbackData

    No definition for _wrap_CallbackData_proc_set

    No definition for _wrap_CallbackData_proc_get

    No definition for _wrap_CallbackData_proc2_set

    No definition for _wrap_CallbackData_proc2_get

    No definition for _wrap_CallbackData_data_set

    No definition for _wrap_CallbackData_data_get

    No definition for _wrap_sqlite3_libversion

    No definition for _wrap_sqlite3_close

    No definition for _wrap_sqlite3_last_insert_rowid

    No definition for _wrap_sqlite3_changes

    No definition for _wrap_sqlite3_total_changes

    No definition for _wrap_sqlite3_interrupt

    No definition for _wrap_sqlite3_complete

    No definition for _wrap_sqlite3_complete16

    No definition for _wrap_sqlite3_busy_handler

    No definition for _wrap_sqlite3_busy_timeout

    No definition for _wrap_sqlite3_set_authorizer

    No definition for _wrap_sqlite3_trace

    No definition for _wrap_sqlite3_open

    No definition for _wrap_sqlite3_open16

    No definition for _wrap_sqlite3_errcode

    No definition for _wrap_sqlite3_errmsg

    No definition for _wrap_sqlite3_errmsg16

    No definition for _wrap_sqlite3_prepare

    No definition for _wrap_sqlite3_prepare16

    No definition for _wrap_sqlite3_bind_blob

    No definition for _wrap_sqlite3_bind_double

    No definition for _wrap_sqlite3_bind_int

    No definition for _wrap_sqlite3_bind_int64

    No definition for _wrap_sqlite3_bind_null

    No definition for _wrap_sqlite3_bind_text

    No definition for _wrap_sqlite3_bind_text16

    No definition for _wrap_sqlite3_bind_parameter_count

    No definition for _wrap_sqlite3_bind_parameter_name

    No definition for _wrap_sqlite3_bind_parameter_index

    No definition for _wrap_sqlite3_column_count

    No definition for _wrap_sqlite3_column_name

    No definition for _wrap_sqlite3_column_name16

    No definition for _wrap_sqlite3_column_decltype

    No definition for _wrap_sqlite3_column_decltype16

    No definition for _wrap_sqlite3_step

    No definition for _wrap_sqlite3_data_count

    No definition for _wrap_sqlite3_column_blob

    No definition for _wrap_sqlite3_column_bytes

    No definition for _wrap_sqlite3_column_bytes16

    No definition for _wrap_sqlite3_column_double

    No definition for _wrap_sqlite3_column_int

    No definition for _wrap_sqlite3_column_int64

    No definition for _wrap_sqlite3_column_text

    No definition for _wrap_sqlite3_column_text16

    No definition for _wrap_sqlite3_column_type

    No definition for _wrap_sqlite3_finalize

    No definition for _wrap_sqlite3_reset

    No definition for _wrap_sqlite3_create_function

    No definition for _wrap_sqlite3_create_function16

    No definition for _wrap_sqlite3_aggregate_count

    No definition for _wrap_sqlite3_value_blob

    No definition for _wrap_sqlite3_value_bytes

    No definition for _wrap_sqlite3_value_bytes16

    No definition for _wrap_sqlite3_value_double

    No definition for _wrap_sqlite3_value_int

    No definition for _wrap_sqlite3_value_int64

    No definition for _wrap_sqlite3_value_text

    No definition for _wrap_sqlite3_value_text16

    No definition for _wrap_sqlite3_value_text16le

    No definition for _wrap_sqlite3_value_text16be

    No definition for _wrap_sqlite3_value_type

    No definition for _wrap_sqlite3_result_blob

    No definition for _wrap_sqlite3_result_double

    No definition for _wrap_sqlite3_result_error

    No definition for _wrap_sqlite3_result_error16

    No definition for _wrap_sqlite3_result_int

    No definition for _wrap_sqlite3_result_int64

    No definition for _wrap_sqlite3_result_text

    No definition for _wrap_sqlite3_result_text16

    No definition for _wrap_sqlite3_result_text16le

    No definition for _wrap_sqlite3_result_text16be

    No definition for _wrap_sqlite3_result_value

    No definition for _wrap_sqlite3_aggregate_context

3 个答案:

答案 0 :(得分:2)

查看您发布的最新错误,看起来您的更新已成功完成。除了更新文档的麻烦之外,gem本身应该可以正常工作。

答案 1 :(得分:1)

您需要安装header-files for Ruby

答案 2 :(得分:0)

正如Marcel建议的那样,安装头文件(通过下载和安装最新版本的Xcode)修复了构建错误。 但是我遇到了一个问题,即sqlite3 1.3.3 gem无法找到Sqlite3并建议安装端口。这没有意义,因为它已经安装在Mac OS X上的/ usr / bin中。 问题是它正在寻找sqlite3的通用二进制文件。我通过强制它使用此命令安装i386架构来修复它:

sudo env ARCHFLAGS="-arch x86_64" gem install sqlite3-ruby