Problem with bundle install

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.

13 comments
Comment actions Permalink

Does it require root privileges in console?

0
Comment actions Permalink

And what was solution?

0
Comment actions Permalink

I don't know exactly, the message just stopped to appear...

0
Comment actions Permalink

I'm facing the same problem.

MacOSX 10.7 RubyMine 3.2.2

0
Comment actions Permalink

Working solution found using Google:

One solution to this is to add the line “Defaults visiblepw” to the /etc/sudoers file.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

@It Arato,

could you please specify if you still experience that problem? (while it works from terminal)

0
Comment actions Permalink

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.

0
Comment actions Permalink

@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.

0
Comment actions Permalink

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.

1
Comment actions Permalink

@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?)

0

Please sign in to leave a comment.