如何安装社交流

时间:2016-01-28 16:25:18

标签: ruby-on-rails ruby social-stream

我正在尝试将Social Stream gem与我的Rails应用程序集成。但是,它返回我已经拥有的依赖项列表,并声明它们是必需的。如何在运行bundle update

时在gemfile中识别宝石
You need to install git to be able to use gems from git repositories. For help
installing git, please refer to GitHub's tutorial at
https://help.github.com/articles/set-up-git

我也在github上查找了网页,但它只解释了如何设置git,我已经完成了。还有另一条错误消息表明ruby文件夹或项目中没有安装git文件:

C:\Ruby22-x64>gem install social_stream-base
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing social_stream-base:
    ERROR: Failed to build gem native extension.

C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160128-17192-1djdrcu.rb extconf.rb
The system cannot find the path specified.
checking for libxml/parser.h... no
-----
libxml2 is missing.  please visit    http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --with-iconv-dir
    --without-iconv-dir
    --with-iconv-include
    --without-iconv-include=${iconv-dir}/include
    --with-iconv-lib
    --without-iconv-lib=${iconv-dir}/lib
    --with-xml2-dir
    --without-xml2-dir
    --with-xml2-include
    --without-xml2-include=${xml2-dir}/include
    --with-xml2-lib
    --without-xml2-lib=${xml2-dir}/lib
    --with-xslt-dir
    --without-xslt-dir
    --with-xslt-include
    --without-xslt-include=${xslt-dir}/include
    --with-xslt-lib
    --without-xslt-lib=${xslt-dir}/lib
    --with-libxslt-config
    --without-libxslt-config
    --with-pkg-config
    --without-pkg-config
    --with-libxml-2.0-config
    --without-libxml-2.0-config
    --with-pkg-config
    --without-pkg-config
    --with-libiconv-config
    --without-libiconv-config
    --with-pkg-config
    --without-pkg-config

    extconf failed, exit code 1

    Gem files will remain installed in C:/Ruby22-   x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.5.11 for inspection.
    Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-  mingw32/2.2.0/nokogiri-1.5.11/gem_make.out

如何才能看到git?

2 个答案:

答案 0 :(得分:0)

好的,所以捆绑更新不会为你做任何事情,捆绑安装是你需要做的,但是如发现的那样,有一个错误。更新只会对已安装的内容进行操作。

我还注意到,当运行'gem install social_stream-base'时,使用bundle时,正确的方法是将gem'inocial_stream-base'添加到gemfile中,然后运行bundle install。我只是为了完整性而添加它。

根据您的错误消息,Nokogiri存在依赖性。以下是如何在Windows上安装它的链接:http://www.nokogiri.org/tutorials/installing_nokogiri.html#windows

您需要安装Nokogiri,并且您可能会遇到任何其他问题,这是我尝试在Windows中使用这些内容时的经验。如果你尝试并且无法对其进行故障排除,那么它将回到Stack O.

但我主要担心的是:

就你的git问题而言,这不会对你有所帮助,但为了完整性,我会推荐你​​Can't run bundle update on Windows,它有各种各样的修复。

答案 1 :(得分:0)

我决定为我正在构建的社交网络应用程序创建自己的gem。由于没有为rails 4.x构建社交流,我认为我不会使用它。谢谢。