using spring does not work from subdirectories
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rails, ruby
- Domain
- cli, developer-experience, tooling
Research direction
Reproduce spring rspec lib/acts_as_list_spec.rb from the spec directory and inspect config/spring.rb alongside the Spring client and server handling of the working directory. Done means Spring locates the parent project's config/application.rb and runs the command with the expected project working directory.
Written by the indexing model from the issue text.
Description
having a rails project with a spec directory:
spring rspec lib/acts_as_list_spec.rb
>> Spring was unable to find your config/application.rb file. Your project root was detected at /Users/cody/src/canvas-lms/spec, so Spring looked for /Users/cody/src/canvas-lms/spec/config/application.rb but it doesn't exist. You can configure the root of your application by setting Spring.application_root in config/spring.rb.
But non-springified works fine, properly searching the parent dir for the Gemfile, and then booting the app.
I've explored this quite a bit by monkey patching, and even if you can get the Spring client to boot via enough tricks, the server will still try to launch from the wrong directory and throw the same error. If you're sneaky and boot the server from the actual project root, and then run spring rspec from the spec directory, it will not have the some working directory, and just be confusing. It seems like the server needs to be directory aware - having the client pass its working directory through, and the server changing to that before running the command.
- Dominant language
- Ruby
- Stars
- 2.8k
- Forks
- 342
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rails/spring
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100