Atom linter-erb failing with "Error: /usr/bin/env: ruby: No such file or directory"
<p>I have the linter set to check on save and it throws this error every time I save a .erb file.  In the settings for the package I have both the following settings specified:</p>

<p>Erb Executable Path
<code>/home/jason/.rvm/rubies/ruby-2.3.0/bin/erb</code></p>

<p>Ruby Executable Path
<code>/home/jason/.rvm/rubies/ruby-2.3.0/bin/ruby</code></p>

<p>I was having a similar issue with the linter-ruby package, but setting the ruby executable path seemed to fix it.  Here's what my path looks like:</p>

<pre><code>$ echo $PATH
/home/jason/.nvm/versions/node/v5.10.0/bin:/home/jason/.rvm/gems/ruby-2.3.0/bin:/home/jason/.rvm/gems/ruby-2.3.0@global/bin:/home/jason/.rvm/rubies/ruby-2.3.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jason/.rvm/bin:/home/jason/.rvm/bin
</code></pre>

<p>Here's the full output of the error.</p>

<pre><code>Error: /usr/bin/env: ruby: No such file or directory
    at parameters.exit (/home/jason/.atom/packages/linter-erb/node_modules/atom-linter/lib/helpers.js:47:27)
    at triggerExitCallback (/opt/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /opt/atom/resources/app.asar/src/buffered-process.js:220:18
    at Socket.&lt;anonymous&gt; (/opt/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
</code></pre>

<p>It seems even though I've specified where it should be looking for ruby, it's still looking in /usr/bin/env.</p>

<p>Here's a bit more output that's hopefully helpful:</p>

<pre><code>$ which erb
/home/jason/.rvm/rubies/ruby-2.3.0/bin/erb

$ which ruby
/home/jason/.rvm/rubies/ruby-2.3.0/bin/ruby
</code></pre>

<p>I'm not sure this would have any effect, but for the sake of trying to cover all my bases, I also have this in ~/.bashrc</p>

<pre><code>[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
</code></pre>

<ul>
<li>Ubuntu: 15.10</li>
<li>kernel: 4.2.0-34</li>
<li>Atom: 1.6.0</li>
<li>linter-erb: 1.0.2</li>
</ul>

<p>I've restarted Atom several times but the error keeps popping up.  Any help would be much appreciated.</p>

<p><strong>EDIT</strong>
I found that if I start Atom from the terminal, I don't have this problem, but when I launch it from the icon in the launcher, the issue crops up again.</p>