Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Windows CLI登录Heroku失败_Heroku_Login_Command Line Interface_Heroku Toolbelt - Fatal编程技术网

使用Windows CLI登录Heroku失败

使用Windows CLI登录Heroku失败,heroku,login,command-line-interface,heroku-toolbelt,Heroku,Login,Command Line Interface,Heroku Toolbelt,我已经为我的窗口电脑下载并安装了heroku toolbelt。 我想在heroku上部署一个应用程序, 但我的登录失败 请帮我解决这个问题 错误消息写在下面 C:\Users\shree1>heroku login DL is deprecated, please use Fiddle Enter your Heroku credentials. Email: xxxx@xxx.com Password (typing will be hidden): C:/Ruby200-x64/li

我已经为我的窗口电脑下载并安装了heroku toolbelt
我想在heroku上部署一个应用程序, 但我的登录失败
请帮我解决这个问题

错误消息写在下面

C:\Users\shree1>heroku login
DL is deprecated, please use Fiddle
Enter your Heroku credentials.
Email: xxxx@xxx.com
Password (typing will be hidden): C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb
n `initialize': No such file or directory (LoadError)
    from C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb:14:in `dlopen'
    from C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb:14:in `initialize'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:236:in `new'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:236:in `ask_
    assword_on_windows'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:211:in `ask_
    redentials'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:262:in `ask_
    nd_save_credentials'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:106:in `get_
    ntials'
    from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:41:in `login
    from C:/Users/shree1/.heroku/client/lib/heroku/command/auth.rb:31:i
    gin'
    from C:/Users/shree1/.heroku/client/lib/heroku/command.rb:221:in `r
    from C:/Users/shree1/.heroku/client/lib/heroku/cli.rb:39:in `start'
    from C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
C:\Users\shre1>heroku登录
DL已弃用,请使用Fiddle
输入您的Heroku凭据。
电邮:xxxx@xxx.com
密码(将隐藏键入):C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb
n`initialize':没有这样的文件或目录(LoadError)
来自C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb:14:in'dlopen'
来自C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb:14:in'initialize'
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:236:in'new'
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:236:in`ask_
windows上的助理
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:211:in`ask_
住宅
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:262:in`ask_
nd\u保存\u凭据'
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:106:in`get_
纳提尔斯
来自C:/Users/shre1/.heroku/client/lib/heroku/auth.rb:41:in`login
来自C:/Users/shre1/.heroku/client/lib/heroku/command/auth.rb:31:i
杜松子酒
来自C:/Users/shre1/.heroku/client/lib/heroku/command.rb:221:in`r
来自C:/Users/shre1/.heroku/client/lib/heroku/cli.rb:39:in'start'
从C:/ProgramFiles(x86)/Heroku/bin/Heroku:29:in`'

这是正在显示的错误消息。

我自己正在摸索解决问题的方法,但这似乎是toolbelt(1.9.3)中包含的ruby版本和您正在使用的ruby版本之间的冲突。在我的例子中,我将ruby版本切换到1.9.3,工具带工作正常。我的应用程序运行的是更新版本的ruby并不重要。

在安装目录之外使用“heroku login”命令时,我遇到了同样的问题,因为它使用了我的ruby 2.1安装,正如@kdmcclin所解释的那样

C:\>heroku login
DL is deprecated, please use Fiddle
Enter your Heroku credentials.
Email: xxxxx@xxxxxxx.net
Password (typing will be hidden): C:/Ruby21-x64/lib/ruby/2.1.0/Win32API.rb:14:in `initialize': No such file or directory (LoadError)
    from C:/Ruby21-x64/lib/ruby/2.1.0/Win32API.rb:14:in `dlopen'
    from C:/Ruby21-x64/lib/ruby/2.1.0/Win32API.rb:14:in `initialize'
    ...
但是,如果先安装dir,然后安装“bin”,则该命令可以正常工作:

C:\Program Files (x86)\Heroku\bin>heroku login
Enter your Heroku credentials.
Email: xxxxx@xxxxxxx.net
Password (typing will be hidden):
Authentication successful.
但是,我们必须从项目dir运行命令。因此,我所做的是更改PATH系统变量,以便在Ruby2.1之前具有Heroku/bin路径

老路:

C:\Ruby21-x64\bin;C:\Program Files (x86)\Heroku\bin;[...Otherstuff...];C:\Program Files (x86)\Git\bin\;C:\Program Files (x86)\git\cmd
新路径:

C:\Program Files (x86)\Heroku\bin;C:\Ruby21-x64\bin;[...Otherstuff...];C:\Program Files (x86)\Git\bin\;C:\Program Files (x86)\git\cmd
现在它开始工作了:

C:\ProjectDir>heroku login
Enter your Heroku credentials.
Email: xxxxx@xxxxxxx.net
Password (typing will be hidden):
Authentication successful.