我已经为我的 Window PC下载并安装了 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>'
这是正在显示的错误信息。
答案 0 :(得分:2)
从安装目录外部使用“heroku login”命令时遇到了同样的问题,因为它使用了@kdmcclin解释的Ruby 2.1安装。
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.
但是,我们必须从我们的项目目录运行命令。所以我所做的是更改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.
答案 1 :(得分:0)
我自己整理问题的方式很混乱,但似乎是工具带(1.9.3)中包含的ruby版本和你正在使用的ruby版本之间的冲突。在我的情况下,我将ruby版本切换到1.9.3并且工具带工作。我的应用程序运行更新版本的ruby并不重要。