Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't play nicely with RVM #1

Closed
scotthovestadt opened this issue May 24, 2013 · 12 comments
Closed

Doesn't play nicely with RVM #1

scotthovestadt opened this issue May 24, 2013 · 12 comments

Comments

@scotthovestadt
Copy link
Contributor

Hi,

Internally, it's trying to execute sass-convert, but on my machine this doesn't work. I'm sure this is because I have multiple ruby gems installed.

To fix this, you need to let users override the environment path via the settings file.

scotthovestadt added a commit to scotthovestadt/SassBeautify that referenced this issue May 24, 2013
…ommand exec

Needed for plugin to work on machines with RVM.
@badsyntax
Copy link
Owner

I'm not familiar with Ruby, but I've had a go with RVM and I have a couple of questions. It looks like RVM updates your path when switching between ruby versions, so surely your gems bin folder (for the specific ruby version) will always be in your path? Are you trying to accommodate a situation where you don't have sass installed for a particular version of ruby? I just want to understand the problem a bit better before merging this...

@badsyntax
Copy link
Owner

I've merged, thanks for this suggestion and code.

I've modified how the path setting is used. The custom path is now appended to the current path, instead of replacing it, which makes it easier to supply a path to a custom sass bin folder, while keeping all your other system paths (like path to ruby). Does this approach still work for your setup?

@scotthovestadt
Copy link
Contributor Author

I originally tried it by appending the path, but I found that this caused it to look in the wrong directory for the gems.

Here is the error it gives me:
screen shot 2013-05-28 at 11 09 47 am

It works without the environment path if I set path to the RVM ruby path. A solution might be setting the default path to $PATH in the settings file (find/replacing it later) and allowing the user to include or exclude it as needed.

RVM in general is clunky and can cause lots of issues.

@badsyntax
Copy link
Owner

Clunky indeed! I don't understand why it works without using the full environment PATH. I also don't understand why your environment path does not contain the paths to the current version of ruby you are using. RVM should update your environment paths when switching ruby versions. All in all, I don't have a good understand of your setup.

I guess your original approach is best in this scenario. I was trying to make it easier for the user, so that they did not have to add multiple paths (for ruby & sass), but it looks like this is not helpful in your situation. I would like to do more testing to replicate your issue so I can understand it a bit better before making the change, but it looks like I'll revert back to specifying the full path instead of appending to environment path.

A long shot, but have you tried appending multiple paths, like so:

{
"path": "/my/path/bin:/my/other/path/bin"
}

@rawcreative
Copy link

I'm having the same problem, just a different error: [Errno 20] Not a directory, Does sass-convert exist in PATH?

I've tried just about every possible method/configuration/trick I could find and nothing works..

@badsyntax
Copy link
Owner

Please paste the contents of your sassbeautify user settings file.

@rawcreative
Copy link

Here's both:

default -

{
"indent": 4,
"dasherize": false,
"old": false,
"path": "/Users/Tim/.rvm/gems/ruby-2.0.0-p0/bin"
}

user -

{
"path" : "/Users/Tim/.rvm/gems/ruby-2.0.0-p0/bin"
}

Have tried using one and not the other, multiple paths, changing sublime's ruby and python paths.. get the same message every time.

On Jun 9, 2013, at 10:01 AM, Richard Willis notifications@github.com wrote:

Please paste the contents of your sassbeautify user settings file.


Reply to this email directly or view it on GitHub.

@scotthovestadt
Copy link
Contributor Author

rawcreative, try using this code instead of what's on the repo:
scotthovestadt@26c63e0

@badsyntax
Copy link
Owner

@rawcreative You are using the path to the ruby bin folder, you need to use the path to the sass bin folder instead.

@badsyntax
Copy link
Owner

Is this still an issue? I'll keep this ticket open for another couple of days, if I don't hear anything back I'll close it.

@ocean90
Copy link

ocean90 commented Aug 26, 2013

If you use /Users/Dominik/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.10/bin instead of /Users/Dominik/.rvm/gems/ruby-2.0.0-p247/bin/sass it works.

@badsyntax
Copy link
Owner

I think we can finally put this one to bed: https://github.com/badsyntax/SassBeautify#compatibility-with-rvm

Upgrade to the latest version (which includes a PATH fix):

  • Open up the command pallete (cmd/ctrl + shift + p)
  • Select: "Package Control: Upgrade Package"
  • Select SassBeautify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants