Coder Social home page Coder Social logo

rbenv about beautifyruby HOT 6 CLOSED

craigwilliams avatar craigwilliams commented on June 24, 2024
rbenv

from beautifyruby.

Comments (6)

nmagedman avatar nmagedman commented on June 24, 2024

The problem is that the shim ~/.rbenv/shims/ruby requires ~/.rbenv/bin to be in the PATH. When you start Sublime Text from Finder (as opposed to from Terminal), your path is just the standard /usr/bin:/bin:/usr/sbin:/sbin. (You can check this by editing BeautifyRuby.sublime-settings, setting "ruby": "echo $PATH", and then hitting control-command-k.) I don't know of a way to set environment variables for all Finder-launched apps.

In TextMate, the solution was to go to Preferences > Advanced > Shell Variables, and add PATH = /Users/Noach/.rbenv/shims:/Users/Noach/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin (~ may work, but it's not what I have). ST2 does not seem to have an equivalent, but I'm a total ST2 newbie.

My workaround was to set the PATH in the "ruby" call. My BeautifyRuby.sublime-settings contains

"ruby": "PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH ruby"

Let me know if that helps.

from beautifyruby.

CraigWilliams avatar CraigWilliams commented on June 24, 2024

@nmagedman Thank you for the explanation and solution!

from beautifyruby.

dfang avatar dfang commented on June 24, 2024

@nmagedman not works for me, i'm using st3 and zsh and rbenv

from beautifyruby.

csun avatar csun commented on June 24, 2024

Same problem here with ST3

from beautifyruby.

dfang avatar dfang commented on June 24, 2024

@nmagedman, @CraigWilliams , if i use "ruby": "PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH ruby", command+ctrl+k will prompt me to check interpreter settings, if change to "ruby": "PATH=~/.rbenv/shims:~/.rbenv/bin:$PATH ruby -v", command+ctrl+k will replace the content of file to ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]

that's wired !

from beautifyruby.

dfang avatar dfang commented on June 24, 2024

@CraigWilliams @nmagedman, this works perfectly, thanks @tamird !

from beautifyruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.