torsten / execute-as-ruby

Atom package to execute the current selection ad Ruby code.
https://atom.io/packages/execute-as-ruby
MIT License
6 stars 4 forks source link

Uncaught Could not locate package path #4

Open Thrashmandicoot opened 9 years ago

Thrashmandicoot commented 9 years ago

[Enter steps to reproduce below:]

  1. ...selected ruby code
  2. ...ctrl + shift + e

insight - looks like you just need to replace the tags of 'editor' with ~ atom-text-editor (new patch)

Atom Version: 0.192.0 System: Microsoft Windows 7 Professional Thrown From: execute-as-ruby package, v0.1.1

Stack Trace

Uncaught Could not locate package path

At C:\Users\Ashton\.atom\packages\execute-as-ruby\lib\execute-as-ruby.coffee:29

undefined

Commands

     -0:58.7 deprecation-cop:view (atom-workspace.workspace.scrollbars-visible-always.theme-monokai.theme-one-dark-ui)
     -0:09.6 execute-as-ruby:execute (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "monokai"
    ]
  }
}

Installed Packages

# User
execute-as-ruby, v0.1.1
minimap, v4.7.6
monokai, v0.14.0

# Dev
No dev packages
yusufkaratoprak commented 9 years ago

not working :(

torsten commented 9 years ago

@Thrashmandicoot @yusufkaratoprak Thanks for the report and sorry for the insane delay, I didn't use Atom anymore but will give it a shot again with 1.0.0.

I updated the package to the latest Atom API, can you confirm that this is fixed now?

Stargator commented 9 years ago

I just ran into the issue today. and I'm running 1.0.3 of Atom.

ghost commented 8 years ago

Still running into this issue.

pjvleeuwen commented 8 years ago

My first attempt to use this plugin, on Atom 1.3.2 and I get this error. This plugin does not seem really useful in this state. Is there any support for this? Or should this plugin be marked end-of-life?

shlormz commented 8 years ago

It's just getting the path wrong for this package. If I open 'execute-as-ruby.coffee' and hard code packagePath = 'C:/Users/MyUser/.atom/packages/execute-as-ruby' instead of throwing the exception it works fine.

cpud36 commented 8 years ago

The solution is to replace "/execute-as-ruby" with "\execute-as-ruby" at execute-as-ruby.coffee:26 for windows machines. So the simpliest solution is to change this to regex test:

if /[/\\]execute-as-ruby/.test(p)
  packagePath = p

More correct solution is to add check for windows machines.

Zejnilovic commented 8 years ago

I have a problem that it says that is the same problem but I have a problem solving it on my own.

Would/Could someone help?

Thanks.

ruby_exec_err.txt