Ruby on rails 尝试启动本地服务器时出错

Ruby on rails 尝试启动本地服务器时出错,ruby-on-rails,terminal,Ruby On Rails,Terminal,尝试启动本地服务器($rails服务器),但收到以下消息: Rails is not currently installed on this system. To get the latest version, simply type: $ sudo gem install rails You can then rerun your "rails" command. Building native extensions. This could take a while... ER

尝试启动本地服务器($rails服务器),但收到以下消息:

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
                                                          ^~~~~~~~~~~~~~~
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue );
                                                                                            ^
1 warning generated.
linking shared-object atomic_reference.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [atomic_reference.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/atomic-1.1.16 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/atomic-1.1.16/ext/gem_make.out
当我尝试运行sudo命令时,我得到了以下消息:

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
                                                          ^~~~~~~~~~~~~~~
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue );
                                                                                            ^
1 warning generated.
linking shared-object atomic_reference.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [atomic_reference.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/atomic-1.1.16 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/atomic-1.1.16/ext/gem_make.out

我能做些什么?

这与Xcode 5.1更新和Mavericks system Ruby版本有关,请参见此处:

我想您刚刚开始使用rails。有一个教程“”,我认为这将是一个很好的开始。第一章也是正确安装rails和其他东西的指南。但是它在昨天和3个月前的Amr…rails 4?你是从回购协议中得到这个项目的吗?如果两者的答案都是肯定的:这是一个常见的“问题”,rails 4需要在repo中提交bin路径(在以前的版本中被忽略)。如果是这种情况,只需运行bundle--binstubs来重新生成这些箱子