How to load environment variables in the Rails console?
About a year ago, the “run” command was added to foreman ref: https://github.com/ddollar/foreman/pull/121 You can use it as follow: foreman run rails console or foreman run rake db:migrate
About a year ago, the “run” command was added to foreman ref: https://github.com/ddollar/foreman/pull/121 You can use it as follow: foreman run rails console or foreman run rake db:migrate
In OSX, run the following in a shell: sudo lsof -nP -iTCP:1025 -sTCP:LISTEN The expected output of this command is a process, which is listening on port 1025: ruby 43841 youruserid 9u IPv4 0x6a1610da80bb9b4f 0t0 TCP 127.0.0.1:1025 (LISTEN) In the output above, the 2nd value is the process ID. Then, to kill the offending process … Read more
I had this problem. I fixed it by uninstalling version 0.62 of the foreman gem and installing 0.61. gem uninstall foreman gem install foreman -v 0.61
The test.support.EnvironmentVarGuard is an internal API that might be changed from version to version with breaking (backward incompatible) changes. In fact, the entire test package is internal use only. It was explicitly stated on the test package documentation page that it’s for internal testing of core libraries and NOT a public API. (see links below) … Read more
FWIW, ‘#’ appears to work as a comment character. It at least has the effect of removing unwanted environment declarations. It might be declaring others starting with a #, but… it still works. EG DATABASE_URL=postgres://mgregory:@localhost/mgregory #DATABASE_URL=mysql://root:secret@localhost:3306/cm_central results in postgres being used by django when started by foreman with this .env file, which is what I … Read more
I’ve been able to resolve this issue by 2 different ways: From https://github.com/ddollar/foreman/wiki/Missing-Output: If you are not seeing any output from your program, there is a likely chance that it is buffering stdout. Ruby buffers stdout by default. To disable this behavior, add this code as early as possible in your program: # ruby $stdout.sync … Read more
You could use two Procfiles (e.g. Procfile and Procfile.dev) and use foremans -f option to select a different one to use in dev: In dev (Procfile.dev contains your shotgun web process): foreman start -f Procfile.dev In production, foreman start will pick up the normal Procfile. Alternatively you could create a bin directory in your app … Read more