heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

heroku client internal error #1206

Open robfairchild opened 10 years ago

robfairchild commented 10 years ago

Hi I get the following error when trying to create a new project on heroku using command line.

C:\Users\Robs Desktop\rails_projects\first_app>heroku create --stack cedar
 !    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:       No such file or directory -  git --version  (Errno::ENOENT)
    Backtrace:   C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/he
lpers.rb:93:in ``'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/he
lpers.rb:93:in `has_git?'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/he
lpers.rb:98:in `git'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/base.rb:269:in `git_remotes'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/base.rb:216:in `extract_app_in_dir'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/base.rb:32:in `app'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/base.rb:238:in `extract_org_from_app'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/base.rb:50:in `org'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand/apps.rb:233:in `create'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/co
mmand.rb:217:in `run'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/lib/heroku/cl
i.rb:33:in `start'
                 C:/Ruby193/lib/ruby/gems/1.9.1/gems/heroku-3.10.3/bin/heroku:17
:in `<top (required)>'
                 C:/Ruby193/bin/heroku:23:in `load'
                 C:/Ruby193/bin/heroku:23:in `<main>'

    Command:     heroku create --stack cedar
    Version:     heroku-gem/3.10.3 (i386-mingw32) ruby/1.9.3

has anyone come across this and knows how to fix it?

jdx commented 10 years ago

looks like you're running the gem and not the toolbelt and you don't have git installed on your path

robfairchild commented 10 years ago

Hi Dickeyxxx

I have now installed toolbelt and managed to create a new application, however when attempting to run the git push command i get the following

-----> Ruby app detected
-----> Compiling Ruby/Rails
/app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:88:in `block in ruby_version': There was an error parsing your Gemfile, we cannot continue (LanguagePack::Helpers::BundlerWrapper::GemfileParseError)
There was an error in your Gemfile, and Bundler cannot continue.
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:76:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:80:in `ruby_version'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:180:in `block in ruby_version'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:173:in `ruby_version'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:259:in `block in install_ruby'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:258:in `install_ruby'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:88:in `block in compile'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:83:in `compile'
    from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:49:in `block in compile'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:47:in `compile'
    from /app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:38:in `block in compile'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:37:in `compile'
    from /app/tmp/buildpacks/ruby/bin/compile:15:in `block (2 levels) in <main>'
    from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:124:in `log'
    from /app/tmp/buildpacks/ruby/bin/compile:14:in `block in <main>'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in `call'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in `block in trace'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
    from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in `trace'
    from /app/tmp/buildpacks/ruby/bin/compile:10:in `<main>'

 !     Push rejected, failed to compile Ruby app
jdx commented 10 years ago

does it work locally? what's in your Gemfile?

robfairchild commented 10 years ago

it did.

im going through the processes in chapter 1 from ruby on rails tutorial. When i got to the part where it originally asked to run "rails server" and go to your loopback address using the browser it worked. However since adding git pro and heroku toolbelt the command line is not recognising the command. I can even do a bundle install as this is also unrecognised.

gemfile listed below

source 'https://rubygems.org'

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development do
    gem 'sqlite3', '1.3.5'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.4'
  gem 'coffee-rails', '~> 3.2.2'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platform => :ruby

  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
jdx commented 10 years ago

definitely get it to work locally before pushing it. One problem you will end up having—although this isn't the one you currently are running into—is that you can't use sqlite on heroku. https://devcenter.heroku.com/articles/sqlite3

It sounds like potentially your ruby installation got messed up—which is not surprising given the windows support for ruby is really bad. Maybe try installing it again via rails installer? And making sure you run the cmd.exe it ships with?

thoroc commented 9 years ago

I was having the same issue as OP although with an installation of the toolbelt. The issue was being caused by the env path variables: when calling echo %PATH% through a terminal MySql was being called and therefore all reference after this path were ignored, including git ....

Just in case someone is finding themselves in this predicament: you might need to put quotes around bad path like this one: C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\.