在mac yosemite 10.10上安装rails

zja*_*ang 2 ruby macos installation ruby-on-rails

OS Yosemite 10.10我正在笔记本电脑上构建ror开发环境.按照[installrails.com] [1]步骤,现在卡在安装rails.有人帮助会很棒.谢谢

构建原生扩展.这可能需要一段时间......错误:安装rails时出错:错误:无法构建gem原生扩展.

/Users/jasonyang/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150329-3365-1fd5w4t.rb extconf.rb checking if the C
Run Code Online (Sandbox Code Playgroud)

编译器接受...是检查C编译器是否接受-Wno-error = unused-command-line-argument-hard-error-in-future ... no使用打包库构建nokogiri.在-lz中检查gzdopen()...是检查iconv ...是的************************************************************************重要的提醒:

使用打包版本的libxml2-2.9.2构建Nokogiri,并应用以下补丁: - 0001-Revert-Missing-initialization-for-catalog-module.patch - 0002-Fix-missing-entities-after-CVE-2014 -3660-fix.patch

Nokogiri团队将继续尽最大努力及时提供安全更新,但如果这是您关注的问题,并希望使用系统库; 中止此安装过程并重新安装nokogiri,如下所示:

gem install nokogiri -- --use-system-libraries
    [--with-xml2-config=/path/to/xml2-config]
    [--with-xslt-config=/path/to/xslt-config]
Run Code Online (Sandbox Code Playgroud)

如果您使用的是Bundler,请告诉它使用以下选项:

bundle config build.nokogiri --use-system-libraries
bundle install
Run Code Online (Sandbox Code Playgroud)

但请注意,nokogiri与OS /软件包供应商提供的任意版本的libxml2不完全兼容.************************************************************************将libxml2-2.9.2.tar.gz解压缩到tmp/x86_64-apple-darwin14.1.0/ports/libxml2/2.9.2 ...运行补丁与/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog -module.patch ...为libxml2运行'patch'2.9.2 ... OK使用/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches运行补丁/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch ...为libxml2运行'patch'2.9.2 ... OK为libxml2 2.9.2运行'configure'... OK为libxml2运行'compile'2.9.2 ... OK为libxml2运行'install'2.9.2 ... OK激活libxml2 2.9.2(来自/Users/jasonyang/.rvm/gems/ruby-2.2.0/ gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.1.0/libxml2/2.9.2)......************************************************************************重要事项注意:

使用打包版本的libxslt-1.1.28构建Nokogiri,并应用以下补丁: - 0001-Adding-doc-update-related-to-1.1.28.patch - 0002-Fix-a-couple-of-places-where -f-printf-parameters-wer.patch - 0003-Initialize-pseudo-random-number-generator-with-curre.patch-0004-EXSLT-function-str-replace-is-broken-as-is.patch - 0006 -Fix-str-padding-to-work-with-UTF-8-strings.patch-0007-Separate-function-for-predicate-matching-in-patterns.patch-0008-Fix-direct-pattern-matching.patch - 0009-Fix-certain-patterns-with-predicates.patch - 0010-fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch-0013-Memory-leak-in-xsltCompileIdKeyPattern-error -path.patch - 0014-fix-for-bug-436589.patch - 0015-Fix-mkdir-for-mingw.patch

Nokogiri团队将继续尽最大努力及时提供安全更新,但如果这是您关注的问题,并希望使用系统库; 中止此安装过程并重新安装nokogiri,如下所示:

gem install nokogiri -- --use-system-libraries
    [--with-xml2-config=/path/to/xml2-config]
    [--with-xslt-config=/path/to/xslt-config]
Run Code Online (Sandbox Code Playgroud)

如果您使用的是Bundler,请告诉它使用以下选项:

bundle config build.nokogiri --use-system-libraries
bundle install
Run Code Online (Sandbox Code Playgroud)

************************************************************************将libxslt-1.1.28.tar.gz解压缩到tmp/x86_64-apple-darwin14.1.0/ports/libxslt/1.1.28 ...运行补丁与/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1 .28.patch ...为libxslt运行'patch'1.1.28 ... OK使用/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches运行补丁/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch ...为libxslt运行'patch'1.1.28 ... OK使用/ Users/jasonyang /运行补丁.rvm/gems/ruby​​-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch ...运行'patch'为libxslt 1.1.28 ... OK运行补丁与/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0004-EXSLT-function-str-replace -is-broken-as-is.patch ...为libxslt 1.1.28运行'patch'...运行使用/使用补丁 RS/jasonyang/.rvm /宝石/红宝石-2.2.0 /宝石/引入nokogiri-1.6.6.2 /端口/补丁/的libxslt/0006-修复-STR-填充到工作用UTF-8-strings.patch ...为libxslt 1.1.28运行'patch'...运行使用/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0007运行补丁-Separate-for-predicate-match-in-patterns.patch ...为libxslt运行'patch'1.1.28 ... OK使用/Users/jasonyang/.rvm/gems/ruby-2.2.0运行补丁/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch ...为libxslt运行'patch'1.1.28 ... OK使用/ Users/jasonyang /运行补丁.rvm/gems/ruby​​-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch ...为libxslt运行'patch'1.1.28 ...运行补丁与/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings -in-EXSLT-crypto-module.patch ...为libxslt运行'patch'1.1.28 ... OK使用/ Users/jas运行补丁 onyang/.rvm/gems/ruby​​-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch ...运行'patch'for libxslt 1.1.28 ... OK使用/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxirilt/0014-Fix-for-bug-436589运行补丁.patch ...为libxslt 1.1.28运行'patch'...运行使用/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt运行补丁/0015-Fix-mkdir-for-mingw.patch ...为libxslt 1.1.28运行'patch'...确定为libxslt运行'configure'1.1.28 ... OK为libxslt运行'compile'1.1.28 ... OK运行'install'for libxslt 1.1.28 ... OK激活libxslt 1.1.28(来自/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ports/ x86_64-apple-darwin14.1.0/libxslt/1.1.28)...在-llzma中检查main()...是在libxml/parser.h中检查xmlParseDoc()...是检查xsltParseStylesheetDoc()in libxslt/xslt.h ...是在libexslt /中检查exsltFuncRegister()exslt.h ...是检查xmlHasFeature()...是检查xmlFirstElementChild()...是检查xmlRelaxNGSetParserStructuredErrors()...是检查xmlRelaxNGSetParserStructuredErrors()...是检查xmlRelaxNGSetValidStructuredErrors().. .是检查xmlSchemaSetValidStructuredErrors()...是检查xmlSchemaSetParserStructuredErrors()...是创建Makefile

让"DESTDIR ="干净

make"DESTDIR ="编译html_document.c编译html_element_description.c编译html_entity_lookup.c编译html_sax_parser_context.c编译html_sax_push_parser.c编译nokogiri.c编译xml_attr.c编译xml_attribute_decl.c编译xml_cdata.c编译xml_comment.c编译xml_document.c编译xml_document_fragment.c编译xml_element_content.c编译xml_element_decl.c编译xml_encoding_handler.c编译xml_entity_decl.c编译xml_entity_reference.c编译xml_io.c编译xml_libxml2_hacks.c编译xml_namespace.c编译xml_node.c xml_node.c:168:15 :警告:未在switch中处理14个枚举值:'XML_ATTRIBUTE_NODE','XML_ENTITY_NODE','XML_DOCUMENT_NODE'... [-Wswitch] switch(reparentee-> type){^ xml_node.c:186:15:warning:15枚举switch中未处理的值:'XML_ATTRIBUTE_NODE','XML_ENTITY_NODE','XML_DOCUMENT_NODE'... [-Wswitch] switch(reparentee-> type){^ xml_node.c:197:1 5:警告:交换机中未处理19个枚举值:'XML_ELEMENT_NODE','XML_ATTRIBUTE_NODE','XML_CDATA_SECTION_NODE'... [-Wswitch] switch(reparentee-> type){^ xml_node.c:165:13:warning:14未在switch中处理的枚举值:'XML_CDATA_SECTION_NODE','XML_ENTITY_NODE','XML_PI_NODE'... [-Wswitch] switch(parent-> type){^ 4生成警告.编译xml_node_set.c编译xml_processing_instruction.c编译xml_reader.c编译xml_relax_ng.c编译xml_sax_parser.c编译xml_sax_parser_context.c编译xml_sax_push_parser.c编译xml_schema.c编译xml_syntax_error.c编译xml_text.c编译xml_xpath_context.c编译xslt_stylesheet.c xslt_stylesheet. c:217:21:警告:指向整数转换的不兼容指针将'void '传递给'VALUE'类型的参数(又名'unsigned long')[--Wind-conversion] Data_Get_Struct(ctxt-> style - > _ private,nokogiriXsltStylesheetTuple,^ ~~~~~~~~~~~~~~~~~~~~ /Users/jasonyang/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/ruby.h: 1044:41:注意:从宏'Data_Get_Struct'扩展((sval)=(type)rb_data_object_get(obj))^ /Users/jasonyang/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ ruby/ruby​​.h:1189:26:注意:将参数传递给参数'obj'这里rb_data_object_get(VALUE obj)^ xslt_stylesheet.c:230:21:警告:指向整数转换的不兼容指针 将'void '添加到'VALUE'类型的参数(又名'unsigned long')[-Wint-conversion] Data_Get_Struct(ctxt-> style - > _ private,nokogiriXsltStylesheetTuple,^ ~~~~~~~~~~~~~ ~~~~~~~ /Users/jasonyang/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/ruby.h:1044:41:注意:从宏'Data_Get_Struct'扩展( (sval)=(type)rb_data_object_get(obj))^ /Users/jasonyang/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/ruby.h:1189:26:注意:传球参数'obj'的参数在这里rb_data_object_get(VALUE obj)^ 2生成警告.链接共享对象nokogiri/nokogiri.bundle ld:warning:找不到选项'-L/Users/haven/.sm/pkg/active/lib'的目录清理仅在构建期间使用的文件.rm -rf /Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2/ext/nokogiri/tmp/x86_64-apple-darwin14.1.0/ports rmdir -p/Users/jasonyang/.rvm/gems/ruby​​-2.2.0/gems/nokogiri-1.6.6.2/ext/nokogiri/tmp/x86_64-apple-darwin14.1.0 rm -rf /Users/jasonyang/.rvm/gems/ruby-2.2.0 /gems/nokogiri-1.6.6.2/ports

make"DESTDIR ="install make:/ usr/local/bin/gmkdir:没有这样的文件或目录make:***[.RUBYARCHDIR .-.nokogiri.time]错误1

make install failed,退出代码2

Gem文件将保留在/Users/jasonyang/.rvm/gems/ruby-2.2.0/gems/nokogiri-1.6.6.2中进行检查.结果登录到/Users/jasonyang/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.6.2/gem_make.out

sup*_*r_p 5

你需要安装coreutils来解决这个问题.

使用MacPorts:

sudo port install coreutils
Run Code Online (Sandbox Code Playgroud)

对于Homebrew:

sudo brew install coreutils
Run Code Online (Sandbox Code Playgroud)