Ruby on rails 在Ruby on Rails项目中配置要安装的Fog
我正在学习RubyonRails,并将我的项目托管在c9.io上。在迁移到Amazon AWS Cloud9的过程中,我必须将我的gems重新安装到我的项目中。我在尝试构建gem本机扩展时遇到配置错误 在命令行中输入“gem install fog”之前,我不确定如何配置这个gem。我尝试在Fog网站上搜索,但在他们的页面上找不到信息 错误是:Ruby on rails 在Ruby on Rails项目中配置要安装的Fog,ruby-on-rails,ruby,rubygems,config,fog,Ruby On Rails,Ruby,Rubygems,Config,Fog,我正在学习RubyonRails,并将我的项目托管在c9.io上。在迁移到Amazon AWS Cloud9的过程中,我必须将我的gems重新安装到我的项目中。我在尝试构建gem本机扩展时遇到配置错误 在命令行中输入“gem install fog”之前,我不确定如何配置这个gem。我尝试在Fog网站上搜索,但在他们的页面上找不到信息 错误是: Building native extensions. This could take a while... ERROR: Error install
Building native extensions. This could take a while...
ERROR: Error installing fog:
ERROR: Failed to build gem native extension.
current directory: /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/ovirt-engine-sdk-4.3.0/ext/ovirtsdk4c
/home/ubuntu/.rvm/rubies/ruby-2.3.4/bin/ruby -r ./siteconf20190515-17400-2yzzer.rb extconf.rb
checking for xml2-config... no
*** 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/ubuntu/.rvm/rubies/ruby-2.3.4/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ubuntu/.rvm/gems/ruby-2.3.4/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.3.0/mkmf.log
extconf failed, exit code 1
我只是不知道如何将此日志消息转换为我的代码库,以便我可以安装fog并继续使用我的应用程序 尝试安装xml2开发包:
apt-get install libxml2-dev
这应该管用!(之后可能需要重新安装Ruby。)而不是
gem 'fog'
使用
在您的gem文件中,它应该可以工作。嗨,Usar,我已经在我的gem文件中添加了:
gem'fog aws'
。这就是为什么我这么困惑!
gem 'fog'
gem 'fog-aws'