-
Notifications
You must be signed in to change notification settings - Fork 128
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
Compass from RVM gemset #49
Comments
Yep, tried that. Bundler asks for the right gems, but they're not there. On Tuesday, May 7, 2013, Sindre Sorhus wrote:
|
I think part of the issue would be convincing grunt.util.spawn to open a login shell. The second part would be allowing us to execute an "rvm use ..." command before our compass command. I don't know how to accomplish either of these, alas. |
Is it a matter of running |
Sorry that I missed your question, @robwierzbowski. No, the problem isn't running bundle install - I don't think it has anything to do with bundler, actually. The issue is with using the right ruby & gemset as specified by RVM configurations. |
@sindresorhus, I don't think this issue should be closed, unless you're explicitly planning not to support RVM for Compass and related gems. |
It's odd that things work differently in a shell prompt and with Grunt, since basically Grunt is spawning a process that runs shell commands. Can you give some example input/output/errors? |
I agree that it's odd, but RVM requires a login shell for some of its magic, and the shell that Grunt spawns isn't a login shell, as far as I can tell. I'll hit you up with some examples as soon as I can! |
Any updates on this? |
As a workaround, for now, you can use https://github.com/sindresorhus/grunt-shell to compile compass / sass files while taking your RVM into account. E.g. shell: {
options: {
stdout: true,
stderr: true
},
compass: {
command: 'compass compile -e production --force'
}
}, |
@peschee I don't see how using grunt-shell is any different. Both uses child_process. |
Just hit this issue myself, very annoying. |
Ditto. Is there any way of setting the ruby version so that I can run I'm currently getting the following error when I set up a
|
I know this is one of those unsatisfying StackOverflow-style use-this-not-this answers, but I stopped using RVM in favor of chruby, as it's much simpler and doesn't have the "bad behavior" associated with RVM (messing with Combining chruby with the bundleExec option on grunt-contrib-compass satisfies the requirements that I'm aware of. The environment variables set by chruby carry over to the child process, and the Gemfile specifies which gem versions are used (of those installed). Keep in mind that bundleExec is false by default. |
An example for folks to test with: https://gist.github.com/michaek/8557774 |
Thanks Michael. A colleague also recommended Haven't had a chance to test it yet though. |
For the record, I reinstalled the current RVM this morning, and I was not able to reproduce this issue. I can't say what brought about the change: new RVM, new grunt-contrib-compass, or a user error that I resolved unknowingly. Regardless, I'm going to close this unless there's confirmation that RVM is still not working in grunt child processes. |
Hi, I have a similar problem to what described here, and I wanted to know if any of the people who posted here encountered it (and hopefully overcome it). |
Do you know of a way to convince Grunt to use the binaries from an RVM gemset instead of system Ruby binaries?
I'm attempting to use my Gemfile/gemset to manage Compass-related dependencies, but my Grunt task is consistently invoking the compass installed with the system Ruby. (From my login shell, all works as expected.)
Thanks!
The text was updated successfully, but these errors were encountered: