next_rails icon indicating copy to clipboard operation
next_rails copied to clipboard

support spring

Open timdiggins opened this issue 3 years ago • 2 comments
trafficstars

Thanks for the work on this fork/gem.

I think that currently commands like next rails c when you have "springified" your rails will cause errors, or will always invoke the previous rails rather than the current one. I think this is a matter of making the ENV var changes exported from the next.sh script in line 39

https://github.com/fastruby/next_rails/blob/3c99380da9aa5f4ecbb3444f9794c721b2d40b7c/exe/next.sh#L39

ie. changing this to

    export BUNDLE_GEMFILE=Gemfile.next BUNDLE_CACHE_PATH=vendor/cache.next 
    bundle exec $@

This is quite a small change so it might be easier if a committer did it, but happy to contribute a PR.

timdiggins avatar Dec 13 '21 14:12 timdiggins

Actually I've just tested this out and my theory seems to be wrong. You need the export BUNDLE_GEMFILE=Gemfile.next in the calling shell (where you type next rails c or whatever) -- doing it within next.sh, doesn't fix the issue with spring.

It would still be good to support spring automatically (you still need to manually start and stop spring) but for now the workaround seems to be to export BUNDLE_GEMFILE=Gemfile.next rather than (or in addition to) using next

timdiggins avatar Dec 13 '21 14:12 timdiggins

I have seen a similar thing.

I have never tried to determine the steps to replicate this issue. Does anyone have the steps to replicate it?

fbuys avatar Jun 15 '23 12:06 fbuys