所以我想将我的应用程序部署到Heroku,注册帐户并做其他必要的事情。但是我遇到了运行命令heroku keys:add
的问题。这是我得到的错误:
ruby@Rubuntu:~/rails_projects/first_app$ heroku keys:add
/home/ruby/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- readline (LoadError)
from /home/ruby/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/heroku-2.1.4/lib/heroku/command/run.rb:1:in `<top (required)>'
from /home/ruby/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/ruby/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/heroku-2.1.4/lib/heroku/command.rb:17:in `block in load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/heroku-2.1.4/lib/heroku/command.rb:16:in `each'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/heroku-2.1.4/lib/heroku/command.rb:16:in `load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/heroku-2.1.4/bin/heroku:13:in `<top (required)>'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/bin/heroku:19:in `load'
from /home/ruby/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/bin/heroku:19:in `<main>'
请帮帮我!
PS!我正在学习使用本书的RoR: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:install_rubygems
答案 0 :(得分:8)
答案 1 :(得分:2)
看起来这是Ubuntu上相当常见的问题。来自另一个论坛的this帖子:
在我的系统Ubuntu(Hardy 8.04)上 需要libncurses5-dev和 libreadline5-dev(安装有 apt-get install。重新运行 “ruby extconv.rb”,它会告诉你 是否缺少其他任何东西,或 创建一个makefile。一旦你拥有了 makefile,运行make,然后make install。
答案 2 :(得分:2)
使用rvm解决了所有问题。
使用ruby安装RVM: $ \ curl -L https://get.rvm.io | bash -s stable --ruby
另外还有rails:
$ \curl -L https://get.rvm.io | bash -s stable --rails
$ gem install heroku
$heroku login