小编Cre*_*ibe的帖子

Ansible安装-clang:错误:未知参数:' - mno-fused-madd'

所以,我发现其他一些铿锵错误似乎有些类似,但是,修复不适用于我的情况.

我正在使用OSX Mavericks,我们正在尝试安装Ansible.我有点正确安装,但是当我尝试安装Ansible时,我得到了这个clang错误.我们首先想到它可能是一个版本问题,所以我在使用gcc49遇到同样的错误后重新安装了gcc46,但我仍然遇到错误.

有谁知道如何解决这一问题?

来自pip.log日志文件的完整错误报告如下:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -Wall -Wstrict-prototypes -Wshorten-64-to-32 -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.9-intel-2.7/src/MD2.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command …
Run Code Online (Sandbox Code Playgroud)

gcc ansible osx-mavericks

23
推荐指数
2
解决办法
2万
查看次数

如何在Ruby中抑制数组上的.each循环的输出?

我搜索过,似乎找不到有类似问题的人.我正在研究Michael Hartle的RoR教程,我发现了一个奇怪的问题.我一直在跟踪他对T的指示,除了Rails 4和Ruby 2.1与他正在使用的旧版本不同.如果用户尝试使用错误数据注册时返回错误,他会创建一个包含的erb文件,标题为_error_messages.html.erb这是文件的代码:

<% if @user.errors.any? %>
 <div class="error_explanation round padding_10">
   <h3 class="error_explanation">
     <%= pluralize(@user.errors.count, "error") %>
     prohibited this user from being saved:
   </h3>
   <p>There were problems with the following fields:</p>
   <ul>
   <%= @user.errors.full_messages.each do |msg| %>
     <li><%= msg %></li>
   <% end %>
   </ul>
 </div>
<% end %>
<br />
Run Code Online (Sandbox Code Playgroud)

现在,当他执行这段代码时,他会得到你所期望的.在User.new尝试无效后,@ user对象指定的无序错误列表.

但是,我得到的输出 - 实际的HTML - 是这样的:

<div class="error_explanation round padding_10">
   <h3 class="error_explanation">
     2 errors
     prohibited this user from being saved:
   </h3>
   <p>There were problems with the following fields:</p> …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails-4

1
推荐指数
1
解决办法
141
查看次数

标签 统计

ansible ×1

gcc ×1

osx-mavericks ×1

ruby ×1

ruby-on-rails-4 ×1