无法安装pg gem os X 10.11.6,Rails 5,ruby 2.3

时间:2016-09-23 03:10:37

标签: ruby-on-rails ruby macos postgresql ruby-on-rails-5

我无法使其工作,我在StackOverflow上尝试了几乎所有的解决方案,我试过了:

  1. 使用自制软件安装/卸载postgresql
  2. 指定配置文件Const vbDoubleQuote As String = """" 'represents 1 double quote (") Const vbSingleQuote As String = "'" 'represents 1 single quote (') Private WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Dim olApp As Outlook.Application Dim objNS As Outlook.NameSpace Set olApp = Outlook.Application Set objNS = olApp.GetNamespace("MAPI") Set myOlItems = objNS.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub myOlItems_ItemAdd(ByVal item As Object) Dim Msg As Outlook.MailItem Dim Title As String Dim Body As String Dim Message As String Set Msg = item Title = Msg.Subject Body = Msg.Body TargetURL = "https://api.pushbullet.com/v2/pushes" Set HttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") HttpReq.Option(4) = 13056 HttpReq.Open "POST", TargetURL, False HttpReq.SetCredentials "user", "password", 0 HttpReq.setRequestHeader "Authorization", "Bearer myAPI" HttpReq.setRequestHeader "Content-Type", "application/json" Message = "{""channel_tag"": ""myChannel"", ""type"": ""note"", ""title"": " & _ vbDoubleQuote & Title & vbDoubleQuote & ", ""body"": " & _ vbDoubleQuote & Body & vbDoubleQuote & "}" HttpReq.Send (Message)
  3. 使用homebrew --force删除postgresql并安装postgres.app
  4. 使用以下命令安装postgres.app文档: (""title"": " & _ vbDoubleQuote & Title & vbDoubleQuote & ") as "Title = Msg.Subject".
  5. 指定postgres.app gem install pg -- --with-pg-config=/usr/local/bin/pg_config
  6. 的pg配置文件

    一切正常,错误总是一样的,日志没有显示任何有用的东西......

    sudo ARCHFLAGS="-arch x86_64" gem install pg

    我花了很多时间尝试自己解决,任何帮助都会受到赞赏。

1 个答案:

答案 0 :(得分:2)

如果您在上次gem pg install / upgrade之后升级了xcode,则应该同意xcode许可证

sudo xcodebuild -license

不幸的是,如果没有这一步,pg构建会因奇数消息而失败。