benschwarz / sublime-bower

Install Bower packages from within Sublime
MIT License
226 stars 12 forks source link

bower install not working on ubuntu/linux #43

Open ducin opened 9 years ago

ducin commented 9 years ago

Hi,

I've just installed sublime bower plugin. I've got bower installed properly (and I've been using it for a long time). I've installed the plugin through browse packages. Most sublime:bower command work (discover packages, configure project), but the main one fails - install. Following error is thrown: https://github.com/benschwarz/sublime-bower/blob/master/bower/utils/api.py#L30 with this message displayed in sublime:

Unable to connect to https://bower.herokuapp.com/packages. Check your internet connection.

This seems strange, since my internet connection works perfectly, bower works perfectly from console and I can view the json output of https://bower.herokuapp.com/packages from the browser.

lgt commented 9 years ago

I have the same issue

bromzh commented 9 years ago

Same trouble. If you try to print exception message, you can see It means that Sublime's python was built without SSL support. UPD This is old open issue https://github.com/SublimeText/Issues/issues/177

octoquad commented 9 years ago

Possibly due to:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 526, in run_
    return self.run()
  File "bower.commands.install in /home/bruce/.config/sublime-text-3/Installed Packages/Bower.sublime-package", line 22, in run
  File "bower.commands.install in /home/bruce/.config/sublime-text-3/Installed Packages/Bower.sublime-package", line 27, in list_packages
  File "bower.utils.api in /home/bruce/.config/sublime-text-3/Installed Packages/Bower.sublime-package", line 32, in get
UnboundLocalError: local variable 'response' referenced before assignment
bromzh commented 9 years ago

@octoquad No, this isn't a reason. This error appears due wrong exception handling: https://github.com/benschwarz/sublime-bower/blob/master/bower/utils/api.py#L28 . The response variable which created in try block will not be available if error occurs.

RyanGannon commented 9 years ago

Is there a workaround for this?