将 SSH 密钥添加到 Heroku(railstutorial.org 上的菜鸟问题)

发布于 2024-09-27 02:51:41 字数 1416 浏览 2 评论 0原文

作为编程新手,我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

仅一夜美梦 2024-10-04 02:51:41

您使用的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文