我正嘗試使用軟件包安裝將寶石安裝到我的新Ruby項目中。我在我的OS X 10.8.4框中使用rbenv設置了Ruby的版本。我收到以下錯誤:安裝原子的錯誤
An error occurred while installing atomic (1.1.13), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.13'` succeeds before bundling.
Kikime:jazzcatalog curt$ gem install atomic
Building native extensions. This could take a while...
Successfully installed atomic-1.1.13
1 gem installed
Kikime:jazzcatalog curt$ rbenv rehash
Kikime:jazzcatalog curt$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Using i18n (0.6.5)
Using minitest (4.7.5)
Using multi_json (1.7.9)
Installing atomic (1.1.13)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/curt/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
/Users/curt/.rbenv/versions/2.0.0-p247/bin/ruby: invalid option -R (-h will show valid options) (RuntimeError)
Gem files will remain installed in /Volumes/Data RAID/htdocs/jazzcatalog/vendor/bundle/gems/atomic-1.1.13 for inspection.
Results logged to /Volumes/Data RAID/htdocs/jazzcatalog/vendor/bundle/gems/atomic- 1.1.13/ext/gem_make.out
An error occurred while installing atomic (1.1.13), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.13'` succeeds before bundling.
前兩行是第一次嘗試輸出的結尾。正如你所看到的,我然後成功地按要求安裝了原子。然後我再次嘗試並得到相同的錯誤。我在安裝atomic時看到了一些錯誤,但沒有一個像這樣。似乎-R選項有問題。由於我沒有首先輸入,所以我不知道要在哪裏改變它。
更新
我開始遍佈rbenv設置爲2.0.0版本-P0和跑軌道新爵士目錄-d mysql的。它死在同一個地方,出現此錯誤:
Installing atomic (1.1.13)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/curt/.rbenv/versions/2.0.0-p0/bin/ruby extconf.rb
creating Makefile
make
compiling atomic_reference.c
atomic_reference.c:50:9: warning: implicit declaration of function 'OSAtomicCompareAndSwap64' is invalid in C99 [-Wimplicit-function-declaration]
if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
^
1 warning generated.
linking shared-object atomic_reference.bundle
make install
/usr/bin/install -c -m 0755 atomic_reference.bundle /Volumes/Data RAID/htdocs/jazzcatalog/vendor/bundle/gems/atomic-1.1.13/lib
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install-so] Error 64
Gem files will remain installed in /Volumes/Data RAID/htdocs/jazzcatalog/vendor/bundle/gems/atomic-1.1.13 for inspection.
Results logged to /Volumes/Data RAID/htdocs/jazzcatalog/vendor/bundle/gems/atomic- 1.1.13/ext/gem_make.out
An error occurred while installing atomic (1.1.13), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.13'` succeeds before bundling.
解決 的嘆息 - 不處理路徑中的空格
這聽起來像這個問題:http://bugs.ruby-lang.org/issues/show/3024雖然說它是固定在2.0.0。 –
它可能類似。我的問題是Rails,這是一個單獨的應用程序。我不知道兩個開發組是密切關聯還是代碼在應用程序之間共享。 – curt
這種問題應該有一個StackWTF版本。成千上萬的感謝@curt – sonxurxo