VMPlayer 中 Ubuntu 64 上的 Ruby on Rails 3 教程
我正在学习 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>'
抱歉 - 我不知道如何将其放入换行符中。
感谢您的帮助! 比尔44077
I am working through chapter 1 of the Ruby on Rails 3 Tutorial I first ran into trouble when I tried to use Git but that was because I hadn't made the SSH Keys. I have that working but next got stuck on trying to add keys to Heroku. I think it should just be able to save using the same keys. This is what I am getting and I can't figure out what the error is telling me. I am totally new to Ruby and 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>'
Sorry - I couldn't figure out how to get this to put in line feeds.
Thanks for any help!
Bill44077
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您的 ruby 尚未使用 readline 进行编译并查看您的 ruby 路径...您正在使用 RVM。
查看此文档:
http://rvm.beginrescueend.com/packages/readline/
基本上您需要使用 readline (--with-readline-dir) 重新安装 ruby。
在安装 ruby 之前不要忘记查看其他 rvm 选项,这样如果您需要 iconv、zlib 或 X,则不必再次重新安装它。
顺便说一句,如果你没有 readline,你的 Rails 控制台应该无法工作,并且你正在部署过程中,所以我想说......你应该更频繁地使用你的 Rails 控制台:-)
享受吧!
It seems your ruby has not been compiled with readline and looking at your ruby path ... you're using RVM.
Look at this documentation :
http://rvm.beginrescueend.com/packages/readline/
basically you'll need to reinstall your ruby with readline (--with-readline-dir).
Don't forget to look at the other rvm options before installing your ruby so you wont have to reinstall it again if you need iconv, zlib or X).
By the way if you don't have readline your rails console should not work and you're in the process of deploying so I'd say ... you should use your rails console more often :-)
Enjoy !