Comments (15)
I also use rbenv and zsh and was having the same issue. This is how I got the test runner to work.
First, go ahead and configure bash to use rbenv by adding the following to ~/.bash_profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
Second, change the commands in the ruby test settings and prefix them with bundle exec.
That's it. All works as planned.
from atom-ruby-test.
Interesting. It looks like Ruby Test is incorrectly assuming rbenv is installed in bash. Installing rbenv in bash seems like that would have fixed it, but apparently not. It could be that it really wasn't installed properly in bash?
Can you try modifying Ruby Test to get it to work with zsh? In Atom's settings, select the Ruby Test package and click the "Open in Atom" button. It'll open an editor window to the Ruby Test source code. From there open the lib/shell-runner.coffee
file. Edit the spawn
call (line 22) to use zsh instead of bash. Not sure what the correct flags are for zsh. For bash, the -l
flag is necessary. Then back to your project's editor window, hit Ctrl+Alt+Cmd+L, then try to run your tests. If that works, then we know basically what needs to happen to get Ruby Test to work with zsh.
from atom-ruby-test.
Just to check whether rbenv is set up correctly, run: bash -l -c "which ruby"
from zsh. It should return the rbenv-supplied ruby path. If instead it returns the system Ruby, then rbenv is not set up correctly in Bash.
from atom-ruby-test.
I am using homebrew to manage RBENV bash -l -c "which ruby"
returns /usr/bin/ruby
. but when I login to an interactive shell which ruby
returns /Users/jrowe/.rbenv/shims/ruby
the correct ruby. I think there is another piece to the puzzle. An overridable ruby path would be awesome for the plugin.
from atom-ruby-test.
Re: zsh. I'm using rbenv and zshell and tried as you suggested, change the spawn command. But I get
zsh: command not found: bundle
(I prepended my rspec commands with bundle exec
.) The login shell flag is the same for zsh, -l
, so I don't think that is it. I couldn't find any examples online of node.js' spawn command with zsh. However, setting up rbenv in bash works for now.
from atom-ruby-test.
Yes, works fine in bash. But, I figured out how we can use different
shells. PR coming.
On Aug 6, 2014 11:59 AM, "Bryan Tomlin" [email protected] wrote:
I also use rbenv and zsh and was having the same issue. This is how I got
the test runner to work.
- Go ahead and configure bash to use rbenv by adding the following to
~/.bash_profileexport PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
- Change the commands in the ruby test settings and prefix them with
bundle exec.That's it. All works as planned.
—
Reply to this email directly or view it on GitHub
#14 (comment)
.
from atom-ruby-test.
Shell option added with #22
from atom-ruby-test.
Everybody who is interested in this feature, can you please test #22 and provide feedback on the PR?
from atom-ruby-test.
The best way to try out a non-official package or a branch is to:
- Uninstall package with apm or Atom settings view
- Download/clone package repo
- Checkout branch if not master
- Run
apm link
from repo directory.
Correct me if there is a better way.
In this case the repo is here: https://github.com/dsandstrom/atom-ruby-test/tree/add-buffered-back . And branch is add-buffered-back.
from atom-ruby-test.
This should work in version 0.9.0. Feel free to post comments on this issue if it doesn't.
from atom-ruby-test.
Thanks @moxley. I noticed that atom needs to be reloaded or restarted for the shells to change. Maybe related to: #5 .
from atom-ruby-test.
This might be the problem: https://github.com/moxley/atom-ruby-test/pull/22/files#diff-5f529e8b1852dcd35a9c63226d9aba83R10
The shell configuration value is assigned to a static property, currentShell
, rather than read from a function call, like cwd
is. Changing currentShell
to a function fixes the problem.
However, there is now an environment issue. The shell can't find the rspec
command, presumably because rvm isn't properly loaded. I'll continue to investigate that issue.
from atom-ruby-test.
I think the two issues are resolved, now published as version 0.9.1. Let me know if there are any more issues.
from atom-ruby-test.
👍! Sorry I haven't had time to look into this further.
from atom-ruby-test.
Yep, I forgot the -l
flag. I also noticed the run-command package has a -i
(interactive), which might be needed.
Something to note for users, this will probably only work for bash like shells (ones that use -c
to run a command from a string).
from atom-ruby-test.
Related Issues (20)
- Overwrites spec files white space if using Whitespace package HOT 1
- Atom 1.17 Docks support HOT 2
- Looking for maintainer HOT 4
- Toggle to the test panel to activate the package: cmd-ctrl-x does not work HOT 2
- Changes required due to TextBuffer.save becoming async in Atom 1.19 HOT 2
- Spring problem, terminal is reopening on each run
- Testing just opens a shell, but doesnt run the tests. HOT 1
- Not have option to zoom/alter the font, is very small. HOT 1
- Uncaught TypeError: Cannot read property 'nodeName' of undefined
- how to test gem
- platformio-ide-terminal no longer supported - how do I reconfigure to use terminus? HOT 3
- not working for win 7 HOT 1
- Closing the test pane leaves a blank bar HOT 2
- Using Atom 1.8.0, the Settings-->Packages widget cant find "Ruby Test" HOT 1
- Spec framework incorrectly identified as minitest when using require_relative spec_helper HOT 1
- Run tests for current code file HOT 2
- Suggestion: Command Prefix HOT 2
- Cancelling doesn't actually cancel. HOT 1
- Update Documentation for running single file test HOT 1
- Focus issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-ruby-test.