Closed cbaines closed 2 months ago
I don't mind trying this, though I vaguely recall that some older versions of Rails didn't always have bin/rails
. Do you remember anything about that?
Rails tooling itself depends on
Could you give an example?
I don't mind trying this, though I vaguely recall that some older versions of Rails didn't always have bin/rails. Do you remember anything about that?
I've only used Rails 4 and 5, so I don't know much from experience for earlier versions.
Rails tooling itself depends on
Could you give an example?
So I was slightly wrong, it seems that the AppLoader [1] depends on either the bin/rails
or script/rails
files existing, and containing some specific contents:
if contents =~ /(APP|ENGINE)_PATH/
Beginning in Rails 4, Rails ships with a
rails
binstub at ./bin/rails ...
Judging by this blurb, this might not be true for Rails 3.2. At least, not always. I'm guessing there are still some users of it out there.
Could you give an example of the following, then?
when the Gemfile.lock is elsewhere
It's time! :black_cat:
Remove the requirements depending on the existance and location of a Gemfile.lock file, as these prevent the proper operation of inf-ruby when the Gemfile.lock is elsewhere, or Bundler is not in use.
Instead, use the existance of bin/rails, as this is something that the Rails tooling itself depends on, and therefore more likely to be both indicative of Rails being used, and required, as Rails is difficult to use without it.