Ruby on Rails 3 VMPlayer中的Ubuntu 64教程

时间:2011-01-31 12:24:57

标签: ruby-on-rails ubuntu heroku

我正在完成Ruby on Rails 3教程的第1章。当我尝试使用Git时,我遇到了麻烦,但那是因为我没有制作SSH密钥。我有这个工作,但接下来卡住试图添加到Heroku的密钥。我认为它应该能够使用相同的密钥保存。这就是我得到的,我无法弄清楚错误告诉我的是什么。我是Ruby和Rails的新手。

    bill44077@ubuntu:~/Sites/rails_projects/first_app$ 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 /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/commands/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 /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `block in <top (required)>'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `each'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/bin/heroku:7:in `<top (required)>'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:19:in `load'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:19:in `<main>'
bill44077@ubuntu:~/Sites/rails_projects/first_app$ 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 /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/commands/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 /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `block in <top (required)>'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `each'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/lib/heroku/command.rb:5:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/heroku-1.17.10/bin/heroku:7:in `<top (required)>'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:19:in `load'
    from /home/bill44077/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:19:in `<main>'

抱歉 - 我无法弄清楚如何将其放入换行符。

感谢您的帮助! Bill44077

1 个答案:

答案 0 :(得分:1)

看来你的ruby还没有用readline编译并查看你的ruby路径......你正在使用RVM。 看看这个文档:

http://rvm.beginrescueend.com/packages/readline/

基本上你需要用readline重新安装你的ruby(--with-readline-dir)。 在安装ruby之前不要忘记查看其他rvm选项,这样如果你需要iconv,zlib或X,你就不必再重新安装它。

顺便说一句,如果你没有readline你的rails控制台不应该工作,你正在部署,所以我会说...你应该更频繁地使用你的rails控制台: - )

享受!