dimanche 18 septembre 2011

Bad URI error with heroku on windows

I wanted to push my little rails app to Heroku but after asking for my credentials, the heroku command failed with the following message:
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/uri/common.rb:156:in `split': bad URI(is not URI?): 10.35.10.249:8080 (URI::InvalidURIError)
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/uri/common.rb:174:in `parse'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:99:in `net_http_class'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:142:in `transmit'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in `post'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/client.rb:554:in `process'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/client.rb:536:in `post'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/client.rb:35:in `auth'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/auth.rb:96:in `ask_for_credentials'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/auth.rb:129:in `ask_for_and_save_credentials'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/auth.rb:71:in `get_credentials'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/auth.rb:19:in `login'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/command/auth.rb:12:in `login'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/lib/heroku/command.rb:114:in `run'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/heroku-2.7.0/bin/heroku:14:in `'
        from C:/RailsInstaller/Ruby1.9.2/bin/heroku:19:in `load'
        from C:/RailsInstaller/Ruby1.9.2/bin/heroku:19:in `
'
Actually, the problem comes once again from my proxy. My environment variable for the proxy was set to HTTP_PROXY=host:port while the Heroku gem expects HTTP_PROXY=http://host:port
I took me one hour to find this, I'd rather read be more carefully the error messages...

Aucun commentaire:

Enregistrer un commentaire