Closed thedrow closed 8 years ago
@thedrow it does do this when executing a task. In case Ruby is not properly set up in bash, so Atom can use it, it may present an error, when querying for tasks, since it executes only rake -T
and may not find the gems.
That's exactly my problem. I have a project that requires me to run rake always with bundle exec and it seems that the plugin doesn't list the tasks with bundle exec which causes the plugin to fail.
@thedrow are you using rvm or rbenv and possibly zsh as your main shell as well? If so make sure that the initialisation of either rvm and rbenv is in .bash_profile
I'm using rvm with bash-it and bash which initializes RVM.
You can try two things:
1) I just found this package: https://atom.io/packages/000-project-shell-env This should init the environment like in your shell.
2) One way I got my env working was by adding rbenv to atom's env via init.coffee like here: https://discuss.atom.io/t/how-to-run-ruby-code-in-a-console-using-rbenv-in-atom/14281/2
I was thinking of adding Gemfile detection to this package, but that would likely lead to a bunch if exceptions for certain cases where gems are in a special gemset, with a special ruby version etc. So the better approach to solve this is to make sure everything around the execution of the scripts in the package.
I'll give it a shot. Thanks!
How do I run rake with bundle exec using this plugin?