Heroku登录失败使用Windows CLI [英] Heroku Login failed using Windows CLI
问题描述
我为 Window PC下载并安装了 heroku-toolbelt 。
我希望将应用程序部署到heroku,
但我的登录失败
请帮我解决这个问题
错误信息写在下面。
C:\ Users \ shree1> heroku login
DL已弃用,请使用小提琴
输入您的Heroku证书。
电子邮件:xxxx@xxx.com
密码(打字将被隐藏):C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb
n`initialize':否C:/Ruby200-x64/lib/ruby/2.0.0/Win32API.rb中的文件或目录(LoadError)
:14:在`dlopen'中的
从C:/ Ruby200-x64 / lib /ruby/2.0.0/Win32API.rb:14:in`初始化'
from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:236:in`new'$ b $ C from C:/Users/shree1/.heroku/client/lib/heroku/auth.rb:236:在`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:`get_
ntials'
from C:/用户/ shree1 / .heroku / client / lib / heroku / auth.rb:41:在`login
from C:/Users/shree1/.heroku/client/lib/heroku/command/auth.rb:31 :来自C:/ User的
gin'
s / shree1 / .heroku / client / lib / heroku / command.rb:221:在`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>'
这是显示的错误信息。
在安装目录外使用heroku login命令时也会出现同样的问题,因为它使用了我的Ruby 2.1安装,如@kdmcclin所解释的那样。
C:\> heroku login
DL已弃用,请使用小提琴
输入您的Heroku证书。
电子邮件:xxxxx@xxxxxxx.net
密码(输入将被隐藏):C:/Ruby21-x64/lib/ruby/2.1.0/Win32API.rb:14:在`initialize'中:否C:/Ruby21-x64/lib/ruby/2.1.0/Win32API.rb中的文件或目录(LoadError)
:14:在`dlopen'中的
从C:/ Ruby21-x64 / lib /ruby/2.1.0/Win32API.rb:14:in`initialize'
...
但是,如果你先安装dir然后bin,命令就可以正常工作:
C:\ Program Files(x86)\Heroku\bin> heroku login
输入您的Heroku证书。
电子邮件:xxxxx@xxxxxxx.net
密码(打字将被隐藏):
认证成功。
但是,我们必须从我们的项目目录运行命令。因此,我所做的是更改PATH系统变量,以便在Ruby2.1之前具有Heroku / bin路径。
老PATH:
C:\Ruby21-x64 \\ \\ bin; C:\程序文件(x86)\Heroku\bin; [... Otherstuff ...]; C:\程序文件(x86)\Git\bin\; C:\\ \\ Program Files(x86)\git\cmd
新路径:
C:\ Program Files(x86)\Heroku\bin; C:\Ruby21-x64\bin; [... Otherstuff ...]; C:\程序文件(x86)\Git\bin\; C:\程序文件(x86)\git\cmd
现在它正在运行:
C:\ ProjectDir> heroku login
输入您的Heroku凭证。
电子邮件:xxxxx@xxxxxxx.net
密码(打字将被隐藏):
认证成功。
I had downloaded and installed heroku-toolbelt for my Window PC.
I wanted an application to be deployed to heroku ,
but My login fails
Please help me to solve this problem
The error messages are written below.
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>'
This is the error messege which is being displayed.
I was having the same problem when using "heroku login" command from outside the install dir, because it used my Ruby 2.1 installation as explained by @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'
...
But if you go first to install dir and then "bin", the command works fine :
C:\Program Files (x86)\Heroku\bin>heroku login
Enter your Heroku credentials.
Email: xxxxx@xxxxxxx.net
Password (typing will be hidden):
Authentication successful.
But, we have to run the command from our project dir. So what I did is changing the PATH system variable in order to have Heroku/bin path before Ruby2.1.
Old PATH :
C:\Ruby21-x64\bin;C:\Program Files (x86)\Heroku\bin;[...Otherstuff...];C:\Program Files (x86)\Git\bin\;C:\Program Files (x86)\git\cmd
New PATH :
C:\Program Files (x86)\Heroku\bin;C:\Ruby21-x64\bin;[...Otherstuff...];C:\Program Files (x86)\Git\bin\;C:\Program Files (x86)\git\cmd
And now it's working :
C:\ProjectDir>heroku login
Enter your Heroku credentials.
Email: xxxxx@xxxxxxx.net
Password (typing will be hidden):
Authentication successful.
这篇关于Heroku登录失败使用Windows CLI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!