Mac OSX Mountain Lion,Rails 4.0.0,Ruby 1.9.3,Postgresql
我和我的一个朋友正在合作一个项目,当我克隆到他的主代码(使用“git clone”)并尝试运行“bundle install”时,我收到了以下消息:
unknown00231254a715:grablink shaunbarnes$ 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.8.1)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.0)
Using activerecord (4.0.0)
Using addressable (2.3.5)
Using bcrypt-ruby (3.1.2)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using thor (0.18.1)
Using railties (4.0.0)
Using coffee-rails (4.0.0)
Using commonjs (0.2.6)
Using orm_adapter (0.4.0)
Using warden (1.2.3)
Using devise (3.1.1)
Using rest-client (1.6.7)
Using dwolla-ruby (2.5.0)
Using bundler (1.3.5)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.10.0)
Using sprockets-rails (2.0.0)
Using rails (4.0.0)
Using filepicker-rails (1.0.0) from git://github.com/Ink/filepicker-rails.git (at master)
Using jbuilder (1.5.2)
Using jquery-rails (3.0.4)
Using json (1.8.0)
Using less (2.3.2)
Using less-rails (2.3.3)
Using libv8 (3.11.8.17)
Installing ox (2.0.11)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
>>>>> Creating Makefile for ruby version 1.9.3 on x86_64-darwin10.8.0 <<<<<
creating Makefile
make
compiling base64.c
compiling cache.c
compiling cache8.c
compiling cache8_test.c
compiling cache_test.c
compiling dump.c
compiling err.c
compiling gen_load.c
compiling obj_load.c
compiling ox.c
compiling parse.c
compiling sax.c
sax.c:90: error: expected declaration specifiers or ‘...’ before numeric constant
sax.c:90: error: expected ‘)’ before ‘!=’ token
sax.c:90: error: expected ‘)’ before ‘?’ token
make: *** [sax.o] Error 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/ox-2.0.11 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/gems/ox-2.0.11/ext/ox/gem_make.out
An error occurred while installing ox (2.0.11), and Bundler cannot continue.
Make sure that `gem install ox -v '2.0.11'` succeeds before bundling.
在本地安装Postgresql并在类似的StackOverflow问题中建议创建新路径后,我收到了完全相同的ERROR消息:
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
我还尝试手动安装gem“gem install ox -v 2.0.11”,但这也以相同的消息结束。
关于为什么会发生这种情况的任何想法?
谢谢!
答案 0 :(得分:1)
问题解决了!谢谢皮平!
我使用rvm安装了不同版本的ruby - 如果你没有这里是链接到网站https://rvm.io/或下载你可以在你的终端使用以下命令:“$ \ curl -L https://get.rvm.io | bash“
以下是我用来加载新ruby版本的命令:
rvm get head
brew install autoconf automake
rvm reload
rvm use ruby-1.9.3-p327-fast --default
然后重新运行“捆绑安装”。