negipo / rails-finder

Atom package to enable fuzzy find with rails project
MIT License
6 stars 2 forks source link

Uncaught TypeError: Cannot read property 'getPath' of undefined #2

Closed art-solopov closed 8 years ago

art-solopov commented 8 years ago

Steps to reproduce:

  1. Start atom in a Rails project directory. Don't open any files.
  2. Try starting any rails-finder commands (e. g. rails-finder:toggle-model).

Atom Version: 1.0.9 System: Ubuntu 14.04.3 Thrown From: rails-finder package, v0.3.0

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /home/user/.atom/packages/rails-finder/lib/main.coffee:51

TypeError: Cannot read property 'getPath' of undefined
  at Object.module.exports.currentPath (/home/user/.atom/packages/rails-finder/lib/main.coffee:51:41)
  at Object.module.exports.pathFinder (/home/user/.atom/packages/rails-finder/lib/main.coffee:48:21)
  at atom-workspace.atom.commands.add.rails-finder:toggle-model (/home/user/.atom/packages/rails-finder/lib/main.coffee:12:28)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:177:20)

Commands

     -6:17 editor:delete-to-beginning-of-word (atom-text-editor.editor.mini.is-focused)
     -6:12.8.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -6:12.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:35.9.0 core:close (div.settings-view.pane-item)
     -0:34.6.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:31.7.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:31.7.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:29.3.0 settings-view:open (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:24.9.0 core:close (div.settings-view.pane-item)
     -0:23.2.0 project-manager:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:20.5.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:20.5.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:19 settings-view:open (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:02.1.0 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:00.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 rails-finder:toggle-model (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {}
}

Installed Packages

# User
go-to-view, v0.3.0
language-diff, v0.3.1
language-haml, v0.21.0
linter-ruby, v1.0.2
project-manager, v2.0.1
rails-finder, v0.3.0
regex-railroad-diagram, v0.8.4
ruby-block-converter, v3.5.0
tab-control, v0.6.7
tabs-to-spaces, v0.11.1
trailing-spaces, v0.3.2

# Dev
No dev packages
negipo commented 8 years ago

thx, I will fix this

apostoiis commented 8 years ago

Hey sorry for putting this here, couldn't find you anywhere else, @negipo can you please tell me the theme-color syntax you are using on the screenshot of rails-finder? Thanks

negipo commented 8 years ago

@apostoiis I'm using Atom Dark with some custom css https://gist.github.com/negipo/ed69ac69d6d8b3019513