Skip to content

Commit 5a51fd9

Browse files
committed
Read the file in the destination root instead of the current directory
1 parent f9785c0 commit 5a51fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

railties/lib/rails/generators/rails/authentication/authentication_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def configure_authentication_routes
3737
end
3838

3939
def enable_bcrypt
40-
if File.read("Gemfile").include?('gem "bcrypt"')
40+
if File.read(File.expand_path("Gemfile", destination_root)).include?('gem "bcrypt"')
4141
uncomment_lines "Gemfile", /gem "bcrypt"/
4242
Bundler.with_original_env { execute_command :bundle, "install --quiet" }
4343
else

0 commit comments

Comments
 (0)