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

zeus command not found, ./bin/zeus works #39

Open
teaforthecat opened this issue Dec 12, 2012 · 7 comments
Open

zeus command not found, ./bin/zeus works #39

teaforthecat opened this issue Dec 12, 2012 · 7 comments

Comments

@teaforthecat
Copy link

Because

  • bundle exec adds a few seconds
  • the path does not seam to be getting set from an environment variable in .bashrc
  • the default directory is set,
  • bundler is using binstubs

using ./bin/zeus works where 'zeus' doesn't.

Is there another way to get the ./bin directory on the path?

see commit:teaforthecat@20bbc8f

@dgutov
Copy link
Collaborator

dgutov commented Dec 15, 2012

the path does not seam to be getting set from an environment variable in .bashrc

Looks like a problem in your setup.

Is there another way to get the ./bin directory on the path?

Do you use RVM?
http://robots.thoughtbot.com/post/15346721484/use-bundlers-binstubs
http://blog.davidchelimsky.net/2011/07/18/stop-typing-bundle-exec/

@teaforthecat
Copy link
Author

Those are good suggestions. I do use rvm and I it is integrated with bundler.
project$ zeus rspec works in shell-mode.
Is there a way to see the environment of a compilation buffer?
here is my setup using el-get:

   (:name rspec-mode
          :type github
          :pkgname "teaforthecat/rspec-mode"
          :after(progn
                  (setq rspec-use-rvm t)
                  (setq rspec-use-opts-file-when-available nil)
                  (setq rspec-use-bundler-when-possible nil)
                  (setq rspec-use-rake-flag nil)))

note that I have two commits that were required to get rspec-verify working with zeus:
teaforthecat@8611e5b
teaforthecat@20bbc8f

@dgutov
Copy link
Collaborator

dgutov commented Dec 16, 2012

Is there a way to see the environment of a compilation buffer?

Evaluating process-environment in the compilation buffer should do that. But please disregard the suggestion of modifying PATH in .bashrc. If that worked, we wouldn't have to use rvm.el.

And looking at the rvm.el code, it doesn't seem to support changing the path for binstubs. Maybe add a feature request there?

note that I have two commits that were required to get rspec-verify working with zeus:

The second one looks incomplete: it obviously breaks the non-binstubs usage of zeus.
The first one, on the other hand, looks generally useful. zeus doesn't accept additional command line arguments, right?

By the way, does using binstubs really eliminate the speed bump of bundle exec for you? According to the comments on the thoughtbot post, the only advantage (on MRI) is less typing.

@pedz
Copy link
Contributor

pedz commented Dec 16, 2012

This is not ready for prime time but here is my solution... A set of bash functions here:

https://github.com/pedz/bash-setup/blob/master/bash_prvm

and a matching emacs file here:

https://github.com/pedz/emacs-lisp/blob/master/pedz/prvm.el

There is a very good chance that there are dependencies that I haven't caught let. The comment in the bash file should tell you what I'm attempting to do.

This is raw rough code... please be gentle with your comments :-)

I am having pretty good luck with most of my environment but its only a few days old.

HTH
pedz

@stantona
Copy link

Not only am I also having issues not finding zeus, I can not find bundle. I am using zsh but applied the script as suggested. The only difference is that I am using rbenv instead of rvm. I don't particularly know where to begin to try and diagnose this issue.

@dgutov
Copy link
Collaborator

dgutov commented May 22, 2014

Not only am I also having issues not finding zeus, I can not find bundle.

First, try moving your rbenv setup from .bashrc to .profile and relogin/reboot. If that doesn't help, try the instruction here: http://blog.senny.ch/blog/2013/02/11/use-the-right-ruby-with-emacs-and-rbenv/

@dgutov
Copy link
Collaborator

dgutov commented Jan 14, 2015

Other configuration options aside, there's a standard approach to use binstubs: add ./bin to PATH (or whatever different directory they're in in your project).

And see thoughtbot/dotfiles#215 for a bit more security-minded approach.

If Emacs doesn't pick up this addition, one can also modify exec-path in their init file.

Not sure if all of this is hard enough for rspec-mode to have to provide dedicated support (which should amount to a new option, and prepending to exec-path locally in rspec-compile).

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