I've got a rails application, which I want to run into a docker container.
我有一个rails应用程序,我想要运行到docker容器中。
I've run bundle install .. but got this error:
我已经运行了bundle安装。但是这个错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
:BuildError: ERROR:未能构建Gem本机扩展。
/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150517-474- 15nbph7.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function 'fbuffer_to_s':
../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
Makefile:237: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /var/www/test/xyz/vendor/bundle/ruby/2.2.0/gems/json-1.7.7 for inspection.
Results logged to /var/www/test/xyz/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0/json-1.7.7/gem_make.out
An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
How can I install the json gem in /vendor/bundle?
如何在/供应商/bundle中安装json gem ?
gem install json -v 1.7.7 --path /vendor/bundle
gem安装json - v1.7.7—path /vendor/bundle。
dosn't work the path param isn't allowed. ...
不允许使用路径param。
1 个解决方案
#1
0
I got the same error. This error is because of the versions of ruby softwares (gems) that we uses doesn't match at some point.
我犯了同样的错误。这个错误是由于我们使用的ruby软件(gems)的版本在某些时候不匹配。
You are using ruby version 2.2.1. Your Gemfile contains the gems of older versions and it depends on json version 1.7.7.
您使用的是ruby版本2.2.1。您的Gemfile包含旧版本的gem,它依赖于json版本1.7.7。
You should install the following ruby version:
您应该安装以下ruby版本:
ruby-1.9.3-p448
to get rid of the error, OR updating your gems that compatible with ruby version 2.2.1 will do the trick.
为了摆脱错误,或者更新与ruby版本2.2.1兼容的gem,将会成功。
#1
0
I got the same error. This error is because of the versions of ruby softwares (gems) that we uses doesn't match at some point.
我犯了同样的错误。这个错误是由于我们使用的ruby软件(gems)的版本在某些时候不匹配。
You are using ruby version 2.2.1. Your Gemfile contains the gems of older versions and it depends on json version 1.7.7.
您使用的是ruby版本2.2.1。您的Gemfile包含旧版本的gem,它依赖于json版本1.7.7。
You should install the following ruby version:
您应该安装以下ruby版本:
ruby-1.9.3-p448
to get rid of the error, OR updating your gems that compatible with ruby version 2.2.1 will do the trick.
为了摆脱错误,或者更新与ruby版本2.2.1兼容的gem,将会成功。