错误安装原子 [英] Error Installing Atomic

查看:85
本文介绍了错误安装原子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用捆绑安装将gems安装到我的新Ruby项目中。我已经在OS X 10.8.4机器上使用rbenv设置了Ruby的版本。我收到以下错误:

I'm trying to install gems to my new Ruby project using bundle install. I've set the version of Ruby using rbenv on my OS X 10.8.4 box. I get the following error:

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。然后,我再次尝试并得到相同的错误。我在安装atomic时遇到了一些错误,但没有一个像这样。选项-R似乎有问题。由于我没有首先输入,因此我不知道要在哪里更改。

The first two lines are the end of the output from first attempt. As you can see, I then successfully installed atomic as requested. I then tried again and got the same error. I've seen a few errors with installing atomic, but none like this one. It seems to have a problem with the option -R. Since I didn't enter it in the first place, I don't know where to change it.

更新

我从头开始将rbenv设置为2.0.0-p0版本,并运行了新的爵士乐目录-d mysql。它在同一位置死于此错误:

I started all over rbenv set to version 2.0.0-p0 and and ran rails new jazz catalog -d mysql. It died at the same place with this error:

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.

已解决
叹为观止-无法处理路径中的空格

SOLVED Sigh - does not handle spaces in path

推荐答案

错误消息并没有为真正的问题提供丝毫线索。捆绑程序或它调用的组件不能正确处理目录名称,其中包含空格。就我而言,是... / Data RAID / ...引起了问题。一旦我将项目移动到其他驱动器上,该驱动器中的路径中就没有空格了,那么一切都会正常进行。看来,可能仅是宝石所在的位置。在较早的尝试中,我创建了一个项目,在该项目中,宝石没有位于包含空格的路径中,但该项目位于其中。就我而言,它没有任何问题。还要注意,gem安装atomic成功。

The error messages don't give the slightest clue as to what the real problem is. Bundler or a component it calls does not properly handle directory names with spaces in them. In my case it was .../Data RAID/... that caused the problem. Once I moved the project to a different drive where there would be no spaces in the path, everything worked fine. It appears it may be only the location of the gems that are the issue. In an earlier attempt, I created a project where the gems weren't located in a path containing spaces, but the project was. It didn't have any problems as far as I went with it. Notice also that the gem install atomic was successful.

这篇关于错误安装原子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆