Skip to content

Commit 4fd39fc

Browse files
justin808claude
andcommitted
Revert Gemfile path change - simpler is better
The File.join(destination_root, "Gemfile") approach added unnecessary complexity. Rails generators run with the Rails root as the working directory, so the simple "Gemfile" string is more reliable and consistent with how other Rails generators resolve paths. This leaves NO net changes from this PR since the auto-remove feature was already reverted in commit 24c4c9c. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 24c4c9c commit 4fd39fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/react_on_rails/install_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def shakapacker_in_bundler_specs?(gem_name)
203203
end
204204

205205
def shakapacker_in_gemfile_text?(gem_name)
206-
gemfile = ENV["BUNDLE_GEMFILE"] || File.join(destination_root, "Gemfile")
206+
gemfile = ENV["BUNDLE_GEMFILE"] || "Gemfile"
207207

208208
File.file?(gemfile) &&
209209
File.foreach(gemfile).any? { |l| l.match?(/^\s*gem\s+['"]#{Regexp.escape(gem_name)}['"]/) }

0 commit comments

Comments
 (0)