When i run bundle install via RubyMine i receive this error "sudo: no tty present and no askpass program specified". If i run via terminal it works fine. I'm using Rubmine 3.0 in Mac OS X.
Same happened to me on Ubuntu + Rubymine 2016.3. Unfortunately none of the recommendations above helped, however I went to my project folder and executed `bundle install` manually and that was able to receive the pwd input.
Hi @Olga,
Yes it is happening. When I open a project (eg rails) without having all gems available, I get a small popup telling that there are not installed gems - with a link. I click a link and a popup window asks me if I want to run it with sudo. If I chose sudo, I add my password and immediately fails - bundle tells me I cannot install as sudo. If I don't chose sudo it will start, however seems to fail authorizing the gem install and ends "successfully" without installing the gems.
On the contrary - on command line I can run bundle install (no sudo) and it asks interactively for my password when needed - and succeed. Hope that helps.
could you please specify what Ruby you have (version and the way it was installed). In addition, if possible please attach a screenshot from Settings | Ruby SDK and Gems.
Does it require root privileges in console?
Problem solved.
And what was solution?
I don't know exactly, the message just stopped to appear...
I'm facing the same problem.
MacOSX 10.7 RubyMine 3.2.2
Working solution found using Google:
One solution to this is to add the line “Defaults visiblepw” to the /etc/sudoers file.
If "sudo: no tty..." error started to appear after upgrade of OS, reinstall the gem bundler and change access rights for bundle.
sudo gem install bundler
sudo chmod +s /usr/bin/bundle
will reset bundle privileges to execute without requiring sudo and "no tty..." error will disappear.
Same happened to me on Ubuntu + Rubymine 2016.3. Unfortunately none of the recommendations above helped, however I went to my project folder and executed `bundle install` manually and that was able to receive the pwd input.
@It Arato,
could you please specify if you still experience that problem? (while it works from terminal)
Hi @Olga,
Yes it is happening. When I open a project (eg rails) without having all gems available, I get a small popup telling that there are not installed gems - with a link. I click a link and a popup window asks me if I want to run it with sudo. If I chose sudo, I add my password and immediately fails - bundle tells me I cannot install as sudo. If I don't chose sudo it will start, however seems to fail authorizing the gem install and ends "successfully" without installing the gems.
On the contrary - on command line I can run bundle install (no sudo) and it asks interactively for my password when needed - and succeed. Hope that helps.
@It Arato,
could you please specify what Ruby you have (version and the way it was installed). In addition, if possible please attach a screenshot from Settings | Ruby SDK and Gems.
Hi @Olga,
Ruby version is:
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
The screenshot (it is a typical rails project):

Also - haven't tried as my trial period has ended, but when I used Rubymine I didn't have gksudo installed, not sure if that's part of it.
@It Arato,
we'll open EAP version soon so you'll be able to test how it goes there. In addition, how was that Ruby SDK installed? (system one?)