我在我的应用中使用了雾宝石s3。 捆绑器不会继续使用雾宝石。 每当我尝试使用fog gem捆绑安装时,捆绑器就会遇到错误。但是当我评论出雾宝石时,它很好。
bash中:
bundle install
bash输出:
Fetching unf_ext 0.0.7.5
Installing unf_ext 0.0.7.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/abhijith/.rvm/gems/ruby-2.4.2/gems/unf_ext-0.0.7.5/ext/unf_ext
/home/abhijith/.rvm/rubies/ruby-2.4.2/bin/ruby -r ./siteconf20180522-15800-1awocpw.rb extconf.rb
checking for -lstdc++... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/abhijith/.rvm/rubies/ruby-2.4.2/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
/home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:542:in `try_link0'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:557:in `try_link'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:775:in `try_func'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:1002:in `block in have_library'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:321:in `open'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:321:in `open'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:347:in `postpone'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for'
from /home/abhijith/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/mkmf.rb:997:in `have_library'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/abhijith/.rvm/gems/ruby-2.4.2/extensions/x86_64-linux/2.4.0/unf_ext-0.0.7.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/abhijith/.rvm/gems/ruby-2.4.2/gems/unf_ext-0.0.7.5 for inspection.
Results logged to /home/abhijith/.rvm/gems/ruby-2.4.2/extensions/x86_64-linux/2.4.0/unf_ext-0.0.7.5/gem_make.out
An error occurred while installing unf_ext (0.0.7.5), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.5'` succeeds before bundling.
In Gemfile:
fog was resolved to 2.0.0, which depends on
fog-ovirt was resolved to 1.0.3, which depends on
rbovirt was resolved to 0.1.5, which depends on
rest-client was resolved to 2.0.2, which depends on
http-cookie was resolved to 1.0.3, which depends on
domain_name was resolved to 0.5.20180417, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
这个gem安装安装在Ubuntu 16.x上,但不安装在我的Ubuntu 18.x上。
提前致谢!
答案 0 :(得分:0)
我遇到了同样的问题,然后我在Gemfile
中使用了gem 'fog-aws'
gem 'fog-aws'
gem 'fog'
然后bundle install
解决了我的问题。
我认为会帮助你。
答案 1 :(得分:0)
在这种情况下,您将只使用S3,而不是
gem 'fog'
改为使用
gem 'fog-aws'
在您的gem文件中,它应该可以工作。