Comments (6)
Note that the correct Ruby is used for forego start
. I confirmed this by running foreman start
then using lsof
to find the PID tied to the port 5000 and then lsof
again to see all files opened by that process. A lot of 1.9.3 ruby and gem files and no 2.0.0 files.
from forego.
Do you have a PATH
or anything related in a .env
file in that project dir?
from forego.
Only custom vars in .env
, nothing Ruby or PATH
related.
from forego.
The only different between run and start is that run's subshell is bash -ic
where start is just bash -c
. Are you setting the default ruby version somewhere in your startup scripts?
from forego.
Ah... that will definitely be why. I think chruby
only works with interactive shell startup. The issue isn't that the default is being set, it's that the local directory version isn't being set. To avoid overriding cd
(a la rvm
) or using shims (a la rbenv
), chruby hooks into precmd
and equivalents to change the env vars before a command is run. IIRC, ZSH does not trigger those hooks if you are not in interactive mode.
However, it looks like chruby now supports non-interactive modes so let me play around with some configuration to see if this can be fixed without forego
changes. I probably just need to make sure that I am requiring chruby's auto.sh
script in my non-interactive startup files.
I'll report back.
from forego.
It seems that merely upgrading chruby
fixed this for me. Oddly, I upgraded 0.3.6 to 0.3.7, but apparently their fixing change was in 0.3.5. Colour me confused on that one, but my immediate issue seems resolvable.
One caveat: reading .ruby-version
from the current directory now works and will use the right project Ruby. But if I explicitly set the Ruby and then use forego run
, this is not the case:
$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]
$ forego run ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]
$ chruby 1.9.3-p429
$ ruby --version
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin13.0.0]
$ forego run ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]
$ cd to/some/project/dir
$ cat .ruby-version
1.9.3-p429
$ forego run ruby --version
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin13.0.0]
However, this is probably just because my non-interactive startup scripts are resetting the PATH
. I haven't investigated as this is unlikely to be a problem for my usage of forego
. I thought I'd document it here just in case somebody else gets to this point and wants to go further.
Thanks for being a sounding board @ddollar!
from forego.
Related Issues (20)
- Latest forego version immediately crashes for rails / node app HOT 3
- PORT env var dependent on the position in the Procfile HOT 2
- forego only extend the first shell variable on the right side of the equal sign in .env file
- Forego adds sleeping bash process for every application (read from .profile) HOT 2
- How to pause or stop a process ?
- Windows Ubuntu
- does not pass on signal to children
- npm script hangs on Windows with "Terminate batch job (Y/N)?" prompt
- Forego i386 binary? HOT 2
- Could you create a new version tag which is compatible with go modules? HOT 1
- Official Forego Docker image
- "forego start" exits immediately with doing nothing on macOS HOT 2
- equinox.io shutting down, publish builds elsewhere? HOT 3
- Download page missing HOT 2
- Prevent environment variables from being overriden?
- request a new release HOT 1
- Immediate exit when using reflex OSX HOT 3
- forego exit In osx HOT 1
- child process doesn't exit in osx HOT 1
- Restart crashed processes HOT 5
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 forego.