我无法使其工作,我在StackOverflow上尝试了几乎所有的解决方案,我试过了:
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)
(""title"": " & _
vbDoubleQuote & Title & vbDoubleQuote & ") as "Title = Msg.Subject".
gem install pg -- --with-pg-config=/usr/local/bin/pg_config
一切正常,错误总是一样的,日志没有显示任何有用的东西......
sudo ARCHFLAGS="-arch x86_64" gem install pg
我花了很多时间尝试自己解决,任何帮助都会受到赞赏。
答案 0 :(得分:2)
如果您在上次gem pg install / upgrade之后升级了xcode,则应该同意xcode许可证
sudo xcodebuild -license
不幸的是,如果没有这一步,pg构建会因奇数消息而失败。