在Rails项目的命令行上运行heroku login命令时出错

时间:2016-04-11 17:55:48

标签: ruby-on-rails ruby ubuntu heroku

第一次嗨我正试图从ruby.railstutorial.org学习ruby on rails并且在我的应用程序部署到heroku时遇到困难。我跑的时候

  heroku login

我收到了这个错误

  undefined method `[]' for nil:NilClass
  3.42.33/lib/heroku/jsplugin.rb:227:in `find_command'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku- 3.42.33/lib/heroku/jsplugin.rb:13:in `try_takeover'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku- 3.42.33/lib/heroku/cli.rb:28:in `start'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-  3.42.33/bin/heroku:17:in `<top (required)>'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/heroku:23:in `load'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/heroku:23:in `<main>'
  /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in    `eval'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in  `<main>'
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

  Error:       undefined method `[]' for nil:NilClass (NoMethodError)
  Command:     heroku login
  Version:     heroku-gem/3.42.33 (i686-linux) ruby/1.9.3


   More information in /home/giri/.heroku/error.log

我的宝石文件

source 'https://rubygems.org'
gem "heroku"
ruby "1.9.3"
gem 'faye'
gem 'thin'
gem 'devise'
gem 'execjs'
gem 'therubyracer'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.2'
# Use postgresql as the database for Active Record
#gem 'pg'
group :development, :test do
gem 'pg'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
使用commnad wget -O- https://toolbelt.heroku.com/install-ubuntu.sh |安装heroku时的/home/giri/.heroku/error.log文件内容SH 日志文件内容是

  2016/02/08 14:40:55 heroku-cli: Adding dependencies...
  2016/02/08 14:42:18  done
 2016/02/08 14:42:18 heroku-cli: Installing core plugins...
  2016/02/08 14:44:26  done
 2016/02/08 14:44:26 Email:
 Heroku client internal error.
  undefined method `[]' for nil:NilClass
 /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-     3.42.33/lib/heroku/jsplugin.rb:60:in `commands'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-3.42.33/lib/heroku/jsplugin.rb:227:in `find_command'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-3.42.33/lib/heroku/jsplugin.rb:13:in `try_takeover'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-3.42.33/lib/heroku/cli.rb:28:in `start'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/gems/heroku-3.42.33/bin/heroku:17:in `<top (required)>'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/heroku:23:in `load'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/heroku:23:in `<main>'
 /home/giri/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'

0 个答案:

没有答案