Error when trying to create Heroku app on Windows
When I try to do heroku create
I get the following error message:
d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command/base.rb:83:in 'read': No such file or directory -d (Errno::ENOENT)
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command/base.rb:83:in 'extract_help'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command/base.rb:51:in 'method_added'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command/addons.rb:14
from d:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in 'gem_original_require'
from d:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in 'require'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command.rb:17:in 'load'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command.rb:16:in 'each'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/lib/heroku/command.rb:17:in 'load'
from d:/Ruby187/lib/ruby/gems/1.8/gems/heroku-2.0.1/bin/heroku:13
from d:/Ruby187/bin/heroku:19:in 'load'
from d:/Ruby187/bin/heroku:19
This was trying to do the command in the Git Bash. I get the same error message when I do heroku list
or any other heroku command.
I also get an identical error message when I do the command in cmd, but the "-d" is replaced with a " - D"
The offending lines it references seem to be mentioning loading all the files from the "commands" folder.
The problems seems to be something with trying to access D as a directory instead of a drive, but I can't figure o开发者_如何学Cut what the problem is.
Does anyone have any ideas for what I should try to fix this?
Extra info: I installed Ruby via the RubyInstaller. I installed heroku via gem install heroku
. I'm running Windows 7 with Windows installed on my C: drive, but Ruby and everything is installed on my D: drive.
Explanation :
I had the same problem when deploying on Win7 to Heroku. It seemed that almost any heroku command threw a similar exception. All of my code was on the C drive, so your multiple drives aren't the root of the problem. I dug a bit deep into the heroku gem and determined that this is a bug within the gem: there are two methods of handling the parsing paths-one which works and one that doesn't.
Solution :
Heroku gem is broken on win7 machines and you can find my fix here.
I'll be submitting this and will update when it's available in the actual gem. I hope this solves your problem.
Update :
Submitted the ticket last night, heroku ticket 106. I did get a reply from someone using 1.8.7 that says it's still not working as it did for me, still looking into it and will keep updating here.
Update 2 :
The fork has been pulled into heroku client 2.0.3 and some additional updates to this issue in 2.0.4 which have closed ticket 106.
Solution Summary :
gem install heroku -v=2.0.4
精彩评论