Comments (10)
I think we should traverse up the directory tree until we find a Gemfile
.
from spring.
I think that's a good idea. We would then:
- run up the directory tree until we find a
Gemfile
- detect the application type from that directory (rails app | engine | unknown => error)
from spring.
I'm not sure how we'd detect if it's a rails app specifically?
from spring.
we could look for config/boot.rb
. For an engine we could peek inside lib/<root_dir_name>/engine.rb
this is would be very brittle tough.
from spring.
Yeah, seems quite brittle. Let's do this:
- Traverse up to the
Gemfile
- Look for
config/application.rb
- If it doesn't exist, look for
test/dummy/config/application.rb
("test/dummy" is what the generator creates in all cases, so seems reasonable to hardcode it) - Otherwise show an error saying that we couldn't find
config/application.rb
Sound ok?
from spring.
I don't like the idea to hardcode test/dummy
. We use spec/dummy
in our engines.
from spring.
There is even a generator option to supply a path where to generate the dummy app.
from spring.
Ah good point. What do you think about linking config/application.rb
to ../spec/dummy/config/application.rb
? Do you reckon that's better/worse than having to create a config/spring.rb
with some config pointing to the app root?
from spring.
I'm fine either way. We could think about adding something to rails to make it possible to detect engines or more specifically to reach the dummy application. If the symlink must be created manually I would favor the configuration option in config/spring.rb
. In my opinion this would be a more reasonable place to look for specific stuff.
from spring.
Yeah I'm coming back around to the config option. Let's merge your patch then.
from spring.
Related Issues (20)
- Environment variables changed by rails cannot be reloaded HOT 3
- Should a Puma server started from feature tests on Rails 6 fork from a Spring process? HOT 1
- Freebsd terminal detach minor problem
- Processes just hang with Spring 4.0 HOT 10
- 3.1.1 started breaking with getpid or cache_classes HOT 12
- NoMethodError when invoking `rails` command without arguments (undefined method `start_with?' for nil:NilClass)
- Unable to start rails console HOT 5
- `Bundler.with_original_env` vs `Bundler.with_unbundled_env` HOT 6
- Periodically auto restart HOT 5
- spring 4.0.0 bundles with rails < 6.0 HOT 1
- spring 4.0.0 gets hanged with rails 6.1 HOT 2
- Different exit code for SIGKILL'ed processes with Spring
- Bundler::GemNotFound when starting running `rails` commands when Gemfile has changed dependencies HOT 4
- `rails db:system:change` command fails via spring HOT 2
- Cut new gem to include latest fix to `digest` HOT 1
- Unable to Ctrl C out of errored rails console
- Server leaks memory HOT 2
- spring binstub modifier does not check for class presence HOT 1
- spring binstub causes Gem::LoadError after bundle update default gem with ext
- Mac forking error HOT 1
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 spring.