将 SSH 密钥添加到 Heroku(railstutorial.org 上的菜鸟问题)
作为编程新手,我正在尝试使用railstutorial.org学习RoR,并在第1.4.1章(http://railstutorial.org/book#sec:1.4.1)中遇到了问题。当尝试添加我的 SSH 密钥时,发生了以下情况:
Basti@Basti-PC ~
$ heroku keys:add
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
readline (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nds/app.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/bin/heroku:7:in
`<top (required)>'
from /usr/local/bin/heroku:19:in `load'
from /usr/local/bin/heroku:19:in `<main>'
我正在使用 Cygwin 运行 Windows Vista。我已经安装了 ruby-1.9.2-p0 和 Rails 3.0.0。
Beeing new to programming I'm trying to learn RoR using railstutorial.org and ran into a problem in chapter 1.4.1 (http://railstutorial.org/book#sec:1.4.1). Whentrying to add my SSH key the following happend:
Basti@Basti-PC ~
$ heroku keys:add
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
readline (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nds/app.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/lib/heroku/comma
nd.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-1.10.14/bin/heroku:7:in
`<top (required)>'
from /usr/local/bin/heroku:19:in `load'
from /usr/local/bin/heroku:19:in `<main>'
I'm running Windows Vista using Cygwin. I have installed ruby-1.9.2-p0 and Rails 3.0.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用的 Ruby 不是针对“readline”库编译的。在 Windows 上编译带有
readline
支持的 Ruby 需要获取 Visual Studio 的副本并徒手编译大量内容。通常我建议您使用 rvm,但是 rvm 不支持 Windows,这正是我刚才提到的原因。
我的建议是在 Linux 机器或 Mac 上进行开发。对于任何认真的开发人员来说,拥有一个 Unix 环境是必须的。
如果您真的很喜欢 Windows,这里有一个在 Windows 上安装 Ruby 1.9 的指南,包括
readline
,但我不知道它是否能解决您当前遇到的问题。The Ruby you are using wasn't compiled against the 'readline' library. Compiling ruby with
readline
support on Windows involves getting a copy of Visual Studio and compiling a lot of stuff with your bare hands.Normally I'd recommend you use rvm, but rvm doesn't support windows for exactly the reason I just mentioned.
My recommendation would be to develop on a Linux machine or a Mac. Having a Unix environment about is a must for any serious developer.
If you're really attached to your Windows, here's a guide on installing Ruby 1.9 on Windows, including
readline
, but I don't know if it'll solve the issue you're currently having.使用 RailsInstaller.org。请参阅我的帖子 http://rails.webintellix.com/2011 /01/19/rails-installer-on-windows/。
Use RailsInstaller.org. See my post http://rails.webintellix.com/2011/01/19/rails-installer-on-windows/.