Skip to content

Commit 6af16f2

Browse files
committed
fix: Honor both Gemfile as well as gems.rb in rails detection
1 parent c8a1f4c commit 6af16f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Scripts/helpers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ export function showNotification(
3939
}
4040

4141
export function isRailsInProject() {
42-
const gemfilePath = nova.workspace.path + '/Gemfile'
42+
let gemfilePath
4343

44-
if (!nova.fs.access(gemfilePath, nova.fs.F_OK)) {
44+
if (nova.fs.access(nova.workspace.path + '/Gemfile', nova.fs.F_OK)) {
45+
gemfilePath = nova.workspace.path + '/Gemfile'
46+
} else if (nova.fs.access(nova.workspace.path + '/gems.rb', nova.fs.F_OK)) {
47+
gemfilePath = nova.workspace.path + '/gems.rb'
48+
} else {
4549
return false
4650
}
4751

0 commit comments

Comments
 (0)