-
Notifications
You must be signed in to change notification settings - Fork 11
Add dev/setup binstubs to more easily setup and dev on local #3238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Install JavaScript dependencies | ||
# system('bin/yarn') | ||
puts "\n== Install JavaScript dependencies ==" | ||
system('yarn check --check-files') || system!('yarn install') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use yarn and docker in our application, add them to our bin/setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the recommended way to setup? Should we update our README?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good call out. Let's update the README. Can make a change for this in this PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added and cleanup sections in readme to reference these new binstubs instead
bin/update
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has been removed in Rails. As bin/setup
is idempotent, and you could just use this instead
51a8ef8
to
9a025ea
Compare
@@ -1,3 +1,3 @@ | |||
app: bin/rails s -p 3000 | |||
web: env RUBY_DEBUG_OPEN=true bin/rails server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen RUBY_DEBUG_OPEN
before. How are you using it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe with foreman you can't access your debugger inside the process as you don't have proper TTY available. Overmind has ways around this, which is why I prefer it, amongst other reasons. But if we can get foreman working nicely too why not?
This came from the default Rails generator in version 7+ from these gems:
rails/jsbundling-rails#146
rails/cssbundling-rails#123
These PRs say:
"When running inside foreman the 'debug' gem will not have a proper TTY available. Running with the --open option enabled allows to start remote sessions and attach a debugger client with rdbg --attach.
More info: https://github.com/ruby/debug#invoke-as-a-remote-debuggee"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM! Thanks for simplifying our setup and running the dev environment.
Rails provides helpful
bin/dev
(in rails 7+) andbin/setup
binstubs to help developers start their project and run their applications.Let's update ours so they work with our stack
(note: bin/update is no longer a thing in latest verions of rails so we can remove this)