Reputation: 39733
Don't ask me too much about why I'm doing this, but I have a shell alias that opens up apple notes for me
alias notes='open /Applications/Notes.app'
This works from the command line if I put it in my ~/.bash_profile script.
When inside of a rails console however, and I run this:
`notes`
Rails returns a STDOUT saying the shell doesn't recognize the command, which it does if I ctrl+d out of the rails console and try it.
EDIT: Here's that error message, which now that I read it again is starting to seem like rails is actually interpreting this for some reason:
script/rails: No such file or directory - notes
So I've tried putting this alias code in: ~/.bashrc and ~/.profile and none of those seem to work.
And I'm just as curious about which shell rails uses as am I wanting to be able to do this tiny thing with the Notes app shortcut.
Thanks
Upvotes: 0
Views: 93
Reputation: 84132
This is a ruby thing rather than a rails thing. The docs for Kernel#exec has this to say about the "standard shell"
The standard shell always means "/bin/sh" on Unix-like systems, same as ENV["RUBYSHELL"] (or ENV["COMSPEC"] on Windows NT series), and similar.
Upvotes: 2