Giter Club home page Giter Club logo

vscode-ruby's People

Contributors

azemoh avatar castwide avatar connorshea avatar cyangle avatar doudou avatar foobarwidget avatar graceful-potato avatar gurgeous avatar hazi avatar hnioche avatar hookyqr avatar jbielick avatar jvilk-stripe avatar kachick avatar karuna avatar kematzy avatar lostintangent avatar mattn avatar nickwarm avatar peret avatar perlun avatar rebornix avatar seraku24 avatar stefansedich avatar toddmazierski avatar tvallois avatar wadetandy avatar wingrunr21 avatar yisraelv avatar ypresto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-ruby's Issues

Can't launch rails app

  • vscode-ruby version: 0.6.0
  • Ruby version: 2.3.1 (using RVM)
  • VS Code version: 1.5.2
  • Operating System: RHEL7

I'm trying to run my rails app from VScode using the extension but I just can't.
I have this in my lauch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Rails server",
            "type": "Ruby",
            "request": "launch",
            "cwd": "/home/AMER/ggrasso/src/unisporkal/account",
            "program": "/home/AMER/ggrasso/.rvm/gems/ruby-2.3.1@unisporkal/bin/rails",
            "args": [
                "server"
            ]
        }
]}

Expected behavior

Rails server starts and I can browse my app.

Actual behavior

I'm only seeing the status bar blink in red once and this message in the Output console: "waiting for debug protocol on stdin/stdout"
Nothing else happens.
The program path seems to be correct because if I change it then there is an error in the debugger console because it can't find rails.

Is there a log that I can look at to see what's the underlying error?

Thanks,
German

Bad syntax highlighting of string literals with % notation

Your environment

  • vscode-ruby version: 0.3.4
  • Ruby version: 2.0.0p645? (I didn't configure the ruby interpreter to use for vscode-ruby, is it taking the system installed one?
  • VS Code version: 1.1.1
  • Operating System: OS X 10.11.3
  • Hardware (optional): MacBook Pro (Retina, Mid 2012)

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

It should show syntax highlighting correctly for string literals with % notation

Actual behavior

It doesn't recognise at all the syntax %q(...) or %w(...); it wrongly assumes that the string will terminate at the first }, with %Q(}) and %r(}) (this one is actually a literal regex, but anyway).

Steps to reproduce the problem

Just type the following valid ruby code:

a = %Q({}z')
b = 4

This should highlight the string {}z'.
It will instead highlight two strings, %Q({} and ') till the next '.

a = %q(33)

Here, it should highlight the string %q(33); instead, it doesn't recognise %q as a prefix for string literals.

Huge system load due to permanent linting

Your environment

  • vscode-ruby version: 0.9.0
  • Ruby version: 2.3.1
  • VS Code version: 1.5.2
  • Operating System: Linux Mint 18
  • Hardware (optional): X220

vscode-ruby configuration:

    "ruby.lint": {
        "rubocop": true,
        "debride": true,
        "ruby": true,
        "reek": true,
        "fasterer": true
    }

Expected behavior

Linters are called during file opening/saving only. If linters are called during the file modification, they should be throttled to avoid linters call 20 times for 20 characters.

Actual behavior

Assumption: linters are called for each file modification. If I type something pretty fast, I run into a huge system load and have to wait a bit for a cooldown :)
screenshot from 2016-10-11 08-30-54
screenshot from 2016-10-11 08-37-29

Steps to reproduce the problem

  • Install and enable all linters
  • Run "top" and press "c"
  • Create some ruby file
  • Type very fast some code with 10 lines
  • Take a look to the "top"

Extension that applies the Ruby lang to files

Your environment

  • vscode-ruby version: 0.6.0
  • Ruby version: 2.1.3
  • VS Code version: 1.5.2
  • Operating System: macOS

Hello there, a few months ago I created an extension that declared the filetype "Dangerfile" to be a Ruby source file:

    "contributes": {
        "languages": [{
        "id": "ruby",
        "aliases": ["Ruby", "ruby"],
            "filenamePatterns": [
                "Dangerfile"
            ]
       }]
    },

Which has broken at some point in the last month, maybe on 1.5.0 or this extension being updated? Do you know if I've done something wrong? The official docker package uses this syntax but I guess it's not trying to use someone else's language implementation

No support for debugging spawned processes

Issue reported by @ronen-burin

OS: Mac

Reproduce steps:

  1. Run rdebug-ide --host 127.0.0.1 --port 1234 ~/.rvm/gems/ruby-2.2.3/gems/thin-1.5.0/lib/thin start
  2. Choose Listen to rdebug-ide configuration as below
{
            "name": "Listen for rdebug-ide",
            "type": "Ruby",
            "request": "attach",
            "cwd": "${workspaceRoot}",
            "remoteHost": "127.0.0.1",
            "remotePort": "1234",
            "remoteWorkspaceRoot": "${workspaceRoot}"
        }

But VS Code doesn't connect to rdebug-ide.

Encoding issue when using gem 'xcodeproj'

Environment

  • vscode-ruby version: 0.5.2
  • Ruby version: 2.3.0p0 (revision 53290)
  • VS Code version: 1.4.0
  • Operating System: OS X El Captian (10.11.5)

Verified ruby, ruby-debug-ide and ruby-debug-basex19 installed

Expected behavior

Should be able to run ruby scripts that use the gem 'xcodeproj' using VS Code

Actual behavior

When executing the script from visual studio code using ruby extension I get the following error:

Uncaught exception: invalid byte sequence in US-ASCII
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `match'
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `match'
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `file_in_conflict?'
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:19:in `read_from_path'
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:200:in `initialize_from_file'
    /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:102:in `open'
    /Users/XXXXXX/script.rb:4:in `<top (required)>'
    /usr/local/bin/rdebug-ide:23:in `load'
    /usr/local/bin/rdebug-ide:23:in `<main>'
/usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `match': invalid byte sequence in US-ASCII (ArgumentError)
    from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `match'
    from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:86:in `file_in_conflict?'
    from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:19:in `read_from_path'
    from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:200:in `initialize_from_file'
    from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:102:in `open'
    from /Users/XXXXXXX/script.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:88:in `debug_load'
    from /usr/local/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:88:in `debug_program'

Steps to reproduce the problem

A ruby script that use 'xcodeproj' gem:

#!/usr/bin/env ruby
require 'xcodeproj'
project = Xcodeproj::Project.open("/Users/ido/projects/sample/sample.xcodeproj")

Notes

I had a similar issue on a jenkins slave and managed to solve it by running the following commands before running the ruby script:

export LANG=en_US.UTF-8
export LC_COLLATE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_MESSAGES=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_TIME=en_US.UTF-8
export LC_ALL=en_US.UTF-8

I didn't find any way to set the environment variable in VS Code before executing the ruby script

It is not recognizing 'ext install Ruby' so it is not installing

Your environment

  • vscode-ruby version: 1.4 not installing
  • Ruby version: 2.3
  • VS Code version: 1.4
  • Operating System: El Capitan
  • Hardware (optional): Macs

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Actual behavior

Steps to reproduce the problem

Rubocop linting

Linting has stopped working for me in version 0.10.0 my settings.json and setup are unchanged.

"ruby.lint": {
  "reek": false,
  "rubocop": true,
  "ruby": true,
  "fasterer": false,
  "debride": false,
  "ruby-lint": false
}

These are the errors I get in the console not sure if they are related or not.

threadService.ts:222 [Extension Host] Uncaught Exception:  Error: write EPIPE(anonymous function) @ threadService.ts:222emitTwo @ events.js:106emit @ events.js:191process.nextTick @ internal/child_process.js:744_combinedTickCallback @ internal/process/next_tick.js:67_tickCallback @ internal/process/next_tick.js:98
threadService.ts:222 [Extension Host] Error: write EPIPE
    at exports._errnoException (util.js:1026:11)
    at WriteWrap.afterWrite (net.js:795:14)(anonymous function) @ threadService.ts:222emitTwo @ events.js:106emit @ events.js:191process.nextTick @ internal/child_process.js:744_combinedTickCallback @ internal/process/next_tick.js:67_tickCallback @ internal/process/next_tick.js:98
shell.ts:441 write EPIPE: Error: write EPIPE
    at exports._errnoException (util.js:1026:11)
    at WriteWrap.afterWrite (net.js:795:14)

No bracket matching in string interpolation syntax

Your environment

  • vscode-ruby version: 0.10.1
  • Ruby version: 2.3
  • VS Code version: 1.7.1
  • Operating System: macOS 10.12.1

Expected behavior

Brackets (parantheses, etc.) should match inside strings. For example:

s = "hello, #{name}"
s = "hello, #{get_name(name)}"
s = "hello, #{[name].join}"

None of these do bracket matching — neither highlight nor editor.action.jumpToBracket.

Actual behavior

I expected bracket matching to work. Both highlighting of matching brackets, and jumping via editor.action.jumpToBracket.

Support for rbenv, bundler?

Your environment

  • vscode-ruby version: 0.3.1
  • Ruby version: 2.3.0
  • VS Code version: 0.10.11
  • Operating System: OS X 10.10
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Debugging a local script to work

Actual behavior

Uncaught exception: cannot load such file -- some_gem/version
    /Users/d/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /Users/d/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /Users/d/work/some_gem/lib/some_gem.rb:1:in `<top (required)>'
    /Users/d/.rbenv/versions/2.3.0/bin/rdebug-ide:23:in `load'
    /Users/d/.rbenv/versions/2.3.0/bin/rdebug-ide:23:in `<main>'
/Users/d/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- some_gem/version (LoadError)

Looks like this debugger extension has no concept of bundler? 'some_gem' is a gem that is installed in the current directory. Bundler output:

Using some_gem 0.1.0 from source at``.

The correct thing would be to run "bundle exec ", not just "" in order for gems to be resolved.

Steps to reproduce the problem

  • bundle gem 'some_gem'
  • cd 'some_gem'
  • add ruby-debug-ide, debase to gemspec
  • bundle install --path vendor
  • attempt to debug local script using 'Debug Local File' configuration

Inspect output in the console does not render multi lines

Your environment

  • vscode-ruby version: 0.3.1
  • Ruby version: 2.2.4p230
  • VS Code version: 0.10.11
  • Operating System: Windows
  • Hardware (optional):

Expected behavior

I have some objects setup with a custom implementation of inspect. When I refer to these objects in the VSCode console during a debug session, I expect to see something like this:

-------------------
| Custom | Output |
-------------------

Actual behavior

The line breaks are not evaluated and instead I get this:

-------------------\n| Custom | Output |\n-------------------

I can get it to print properly in the console by typing "puts obj.inspect", but it should really display the right thing if I just type "obj", just like it would in an IRB session for example.

From this issue it sounds like VSCode internally has an API to produce multi-line output, and there doesn't seem to be anyway for me to influence this by changing the formatting of my inspect string.

So I was wondering if vscode-ruby could/should be splitting inspect output by newlines and presenting these to the console API as multiple lines?

Thanks again for vscode-ruby btw, its really great and has come on a lot in such a short time!

Prompt user to install tools when necessary

Your environment

  • vscode-ruby version: 0.6.0
  • Ruby version: 2.3.1p112
  • VS Code version: Insiders 1.6
  • Operating System: OSX
  • Hardware (optional):

Install Ruby
Open VS code
Install Ruby extension
write simple main.rb file:

def hi(name)
   puts "Hello #{name}"
   end

hi("there")

Press F5 to create a launch.json
Choose the 'debug local file' option
Press F5 again

Result: Nothing happens
Expected: Prompt that says "ruby-debug-ide" is not installed

Better yet, can we install this on first activation of the extension?

Syntax highlight issue with "=" sign

Your environment

  • vscode-ruby version: 0.5.6
  • Ruby version: any
  • VS Code version: 1.5.1
  • Operating System: Linux

Expected behavior

No spaces around equal sign should keep correct syntax highlighting for the rest of the code:

selection_003

Actual behavior

When having no spaces around equal sign I see the rest of the highlighting broken:

selection_002

Steps to reproduce the problem

Type in a few lines of code according to the ones seen in above screenshots.

breakpoint not being hit in remote debugging

Your environment

  • vscode-ruby version: 0.5.2
  • Ruby version: ruby 2.2.2p95
  • VS Code version: Version 1.3.0-insider
  • Operating System: ubuntu 14.04
  • ruby-debug-ide : 0.6.0

config looks like:

{
   "name": "Listen for rdebug-ide",
   "type": "Ruby",
   "request": "attach",
   "cwd": "${workspaceRoot}",
   "remoteHost": "127.0.0.1",
   "remotePort": "1234",
   "remoteWorkspaceRoot": "${workspaceRoot}"
 }

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

on remote server I:

$ rdebug-ide try.rb 
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 127.0.0.1:1234

I have ssh tunnel to remote host on same port.
I set a breakpoint in the code.

I click run in debugger.
expect debugger to stop at breakpoint, It doesn't it runs the program to completion.

Actual behavior

doesn't stop at breakpoint.

Steps to reproduce the problem

MethodLength does not count spaces

Your environment

  • vscode-ruby version: 0.5.2
  • Ruby version: 2.1.0
  • VS Code version: 1.3.1
  • Operating System: Windows 7 64-bit

Expected behavior

No warning when I add:

# rubocop: disable MethodLength

Actual behavior

Unnecessary disabling of 'Metrics\MethodLength'. (Lint/UnneededDisable)

Steps to reproduce the problem

Use the following block of code. Run RuboCop from the command prompt command line. Notice there are 17 lines (8 of which are blank), so it triggers the MethodLength warning.

  def a
    puts '1'

    puts '2'

    puts '3'

    puts '4'

    puts '5'

    puts '6'

    puts '7'

    puts '8'

    puts '9'
  end

Adding the disable for MethodLength:
# rubocop: disable MethodLength
removes the warning from the command-prompt window, but VS Code then gives the following warning (and highlights the line above):

Unnecessary disabling of 'Metrics\MethodLength'. (Lint/UnneededDisable)

It seems to be an issue caused by the empty lines in the method. If I put 17 lines of actual code, neither VS Code or the command-line report an error.

Christoph
GE Healthcare

not working

Sorry, may be I am too early while this extension seems like in test phase, I am getting error as below (Ruby 1.9.3 p551), on windows 7 x64 ent.
spawn rdebug-ide ENOENT
Debugger client error, Error: This socket is closed.
also tried with Ruby 2.0 or 2.2 with x64, cannot install ruby-debug-base19x

Thanks for the help.

Stepping out of function, expected control on next line

Your environment

  • vscode-ruby version: 0.3.1
  • System: Windows 10 x64, VS Code 0.10.11
  • Ruby version: ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

I have the following, ruby-debug-basex19 is maybe a typo or something? It doesn't seem to be a published gem.

*** LOCAL GEMS ***

ap (0.1.1)
bigdecimal (1.2.6)
debase (0.2.1)
debase-ruby_core_source (0.8.4)
httparty (0.13.7)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
multi_xml (0.5.5)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
ruby-debug-ide (0.4.32)
test-unit (3.0.8)

Expected behavior

For this script, with a breakpoint on line 2, I expect that step out (shift-f11) would put move forward the current line to line 6. Basically, you can see the expected behavior if you also put a breakpoint on line 6, and step out of line 2.

def hello what
    "hello #{what}" # breakpoint here, then shift-f11
end

pp hello("world")
pp "whatever" # expected control to move here

Actual behavior

Script prints both lines of output and exits

Steps to reproduce the problem

With the ruby 2 setup from the readme, paste this script in, put in the breakpoint on line 2, start debugging, hit shift f11, observe.

ES7 methods and XMLDom error handling breaks SERVER MODE

The code runs perfectly in extension mode or test pipeline, but if you try to develop in server mode, in which case you can set breakpoints to the debugger adapter, it breaks as below

seems currently server mode doesn't have a good support for ES7 methods.

BTW, even if I convert these methods to ES5 style, Variables are missing, it's likely a bug.

Error when start debugger:

Your environment

Mac OSX

  • vscode-ruby version: plugin version 0.3.0
  • System: Mac OSX el cap
  • Ruby version: 2.2.0
  • Hardware(optional): macbook pro 13'

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

start debugger

Actual behavior

Debugger error: Client: Error: getaddrinfo ENOTFOUND localhost undefined:1234

Steps to reproduce the problem

vscode

'Go to definition' does not work in v0.10.0

Your environment

  • vscode-ruby version: 0.10.0
  • Ruby version: ruby 2.3.1p112
  • VS Code version: 1.6.1
  • Operating System: Ubuntu 16.10
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Press F12 (or choose 'Go to definition' on right click menu) when cursor is on a method/module name, then editor jump to the definition of this method/module. (vscode-ruby v0.9.0 works like this.)

Actual behavior

(After upgraded vscode-ruby to v0.10.0) Nothing happens after press F12. And there is no 'Go to definition' in right click menu.

Steps to reproduce the problem

  1. Using vscode-ruby v0.9.0 and this function works as expected.
  2. Upgrade vscode-ruby to v0.10.0 and restart vscode
  3. Cannot use this function in the same workspace
  4. Try to restart vscode, still not working
  5. Check ruby,rebase,ruby-debug-ide, they are all installed

debug sinatra based app

Your environment

  • vscode-ruby version: 0.5.1
  • Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
  • VS Code version: 1.1.1
  • Operating System: RHEL 7.2
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Well I don't have ruby-debug-base installed, as it seems to be relevant for 1.9 versions only

Expected behavior

Possible to debug sinatra based app.

Actual behavior

Fails while launching the debug with err:

/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x75be58 debase-0.2.1> (NoMethodError)
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/debase-0.2.1/lib/debase.rb:4:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
from /usr/local/rvm/gems/ruby-2.3.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/bin/rdebug-ide:23:in `load'
from /usr/local/rvm/gems/ruby-2.3.0/bin/rdebug-ide:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Steps to reproduce the problem

  1. cloned project:

    clone https://github.com/datarator/datarator.git
    cd datarator
    code .

  2. opened in vstudio and created launch config with contents:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Debug Local File",
                "type": "Ruby",
                "request": "launch",
                "program": "${workspaceRoot}/config.ru"
            }       
        ]
    }
    
  3. Tried to debug, resulting in error above.

Intellisense support

I'm prototyping with rsense but for now it lacks support for Windows platform. Will drop more info here later on.

Uncaught exception while launching rails server in debug view

Your environment

  • vscode-ruby version: 0.10.3
  • Ruby version: 2.3.1
  • VS Code version: 1.7.1
  • Operating System: macOS Sierra
  • Hardware (optional):

I am getting an error while trying to start the rails server from the debug view.

Here's the relevant part of launch.json:

{
  "version": "0.2.0",
  "configurations": [
...
    {
      "name": "Rails server",
      "type": "Ruby",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "program": "${workspaceRoot}/bin/rails",
      "args": [
        "server"
      ]
     }
...
  ]
}

Expected behavior

The rails server to start.

Actual behavior

Uncaught exception: invalid byte sequence in US-ASCII
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/yaml_serializer.rb:55:in `split'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/yaml_serializer.rb:55:in `load'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:287:in `block in load_config'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/shared_helpers.rb:105:in `filesystem_access'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:283:in `load_config'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:43:in `initialize'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:209:in `new'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:209:in `settings'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:438:in `configure_gem_path'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:433:in `configure_gem_home_and_path'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:62:in `configure'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:126:in `definition'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:93:in `setup'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/setup.rb:20:in `<top (required)>'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
  /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
  /Users/username/work/sso/bin/rake:15:in `<top (required)>'
  /Users/username/.rbenv/versions/2.3.1/bin/rdebug-ide:22:in `load'
  /Users/username/.rbenv/versions/2.3.1/bin/rdebug-ide:22:in `<main>'
/Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/yaml_serializer.rb:55:in `split': invalid byte sequence in US-ASCII (ArgumentError)
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/yaml_serializer.rb:55:in `load'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:287:in `block in load_config'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/shared_helpers.rb:105:in `filesystem_access'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:283:in `load_config'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/settings.rb:43:in `initialize'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:209:in `new'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:209:in `settings'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:438:in `configure_gem_path'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:433:in `configure_gem_home_and_path'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:62:in `configure'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:126:in `definition'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:93:in `setup'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/setup.rb:20:in `<top (required)>'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
  from /Users/username/work/sso/bin/rake:15:in `<top (required)>'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:88:in `debug_load'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:88:in `debug_program'
  from /Users/username/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:130:in `<top (required)>'
  from /Users/username/.rbenv/versions/2.3.1/bin/rdebug-ide:22:in `load'
  from /Users/username/.rbenv/versions/2.3.1/bin/rdebug-ide:22:in `<main>'

Steps to reproduce the problem

  1. Open Visual Studio Code
  2. Open a Rails project
  3. Goto Debug view
  4. Select Rails server from the dropdown
  5. Start debugging

Ruby linting broken - invalid value in default settings

Your environment

  • vscode-ruby version: 0.8.0
  • Ruby version: ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin12.0]
  • VS Code version: 1.5.3
  • Operating System: OSX El Capitan
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

editors should show rubocop lint output

Actual behavior

after latest update and restart of VS Code, editing 'user settings' or 'workspace settings' produces a single item in the warnings pane reading 'Value is not an accepted value. Valid values: ["rubocop"](767, 20)'

The default settings can't be edited, so this error can't be fixed.

Steps to reproduce the problem

Install vscode-ruby
Open user or workspace settings
ruby_default_settings_invalid

Support for formatting/beautifying Ruby files

Your environment

  • vscode-ruby version: 0.5.6
  • Ruby version: 2.3.0
  • VS Code version: 1.5.1
  • Operating System: Ubuntu 16.04

Expected behavior

It'd be great to have some formatting/beautifying functionality in the vscode-ruby plugin.

Actual behavior

As for now, there is no way to format/beautify .rb and .erb files inside vscode in a proper way.

Workaround

I worked around this by:

  • Installing htmlbeautifier and rbeautify gems.
  • Editing my Tasks file as follows:
{
    "version": "0.1.0",
    "command": "sh",
    "args": ["-c"],
    "isShellCommand": false,    
    "showOutput": "never",
    "suppressTaskName": true,
    "tasks": [        
        {
            "taskName": "Ruby format",
            "args": ["rbeautify ${file}"]
        },
        {
            "taskName": "ERB format",
            "args": ["htmlbeautifier ${file}"]
        }
    ]   
}
  • Now, selecting the "Ruby format" task for .rb files or the "ERB format" task for .erb files formats the files in place.
  • Hotkeys can also be assigned to quickly invoke both tasks.

WSL Documentation

Hi,

Wonderful repo you have. Been reading over source and docs to understand what's going and it's been easy to understand.

I'm a fairly new user to WSL (Windows Subsystem for Linux) and wanted to get VSCode (installed in Windows) playing nicely with ruby installation in Bash on Windows. I feel like I could follow https://github.com/rubyide/vscode-ruby/wiki/3.-Attaching-to-a-debugger but I'm not 100% sure how to translate the steps.

Would you consider adding a specific tutorial, instructions, or example config for using WSL ruby installation and VS Code (installed on windows)?

Thanks

Broken code higlighting

Environment

  • vscode-ruby version: 0.5.2
  • Ruby version: 2.1.8
  • VS Code version: 1.2.1
  • Operating System: OSX

Expected behavior

Syntax highlighting should continue to work.

Actual behavior

Highlighting broken when using the symbol index with a division sign \

Steps to reproduce the problem

Create a new ruby file with the following code:

test = index / 1
puts 'I should be syntax highlighted! (But I am not).'

Go to Symbol not working

Your environment

  • vscode-ruby version: latest (as of July 12th)
  • Ruby version: 2.2.4 (MRI)
  • VS Code version: 1.3.0
  • Operating System: Mac OSX 10.11.5
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behaviour

Open a ruby file, press cmd-shift-O and see a list of symbols from the file to go to

Actual behavior

Open a ruby file, press cmd-shift-O and see "Unfortunately we have no symbol information for the file"

Steps to reproduce the problem

Open a ruby file, press cmd-shift-O and see "Unfortunately we have no symbol information for the file"

debugger still breaking after I turn off the breakpoint

Your environment

  • vscode-ruby version: 0.5.2
  • Ruby version: 2.2
  • VS Code version: 1.4
  • Operating System: windows 10
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

the debugger doesn't stop on the line after removing the breakpoint

Actual behavior

the debugger does stop on the line

Steps to reproduce the problem

click to the left of a line in main.rb to set a breakpoint, line 12 below for example
debug the local ruby script,
after the debugger stops at the line, click to the left of the line to remove the breakpoint
continue the script and then the debugger still stops as if there were a breakpoint

main.rb

file = File.read("test.txt")
words = {}
file.split.each {|aword|

count = words[aword]
if count
    count = count + 1
else
    count = 1 
end

words = words.merge aword=>count

}
words.each { |key, value|
puts "The word #{key} accours #{value} times"

}

Debugging rails starts and exits immediately

Your environment

  • vscode-ruby version: 0.10.3
  • Ruby version: 2.3.0
  • VS Code version: 1.7.2
  • Operating System: Ubuntu 16.04 (in VirtualBox on Windows 10)
  • Hardware (optional): Acer Aspire V15

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

  • This gem does not exist so I can't install it (nor is it in your docs, weird) : ruby-debug-basex19

Expected behavior

Rails runs

Actual behavior

Rails starts (perhaps) and stops. See here:
test

Steps to reproduce the problem

Use this launch.json setting, hit run:

    {
      "name": "Rails server",
      "type": "Ruby",
      "request": "launch",
      "showDebuggerOutput": true,
      "useBundler": true,
      "cwd": "${workspaceRoot}",
      "program": "/home/rje/.rvm/gems/ruby-2.3.0/bin/bundle",
      "args": [ "exec", "rails", "s" ]
    }

auto-indent issue with Ruby syntax

Your environment

  • vscode-ruby version: 0.5.2
  • Ruby version: 2.2.3
  • VS Code version: 1.4.0
  • Operating System: Mac OS X 10.11.6 (15G31)
  • Hardware (optional): 15" MacBook Pro Retina

Expected behavior

When coding in Ruby, there seems to be an issue with the auto-indent. What I expect to have

def test_foo
  if cond == true
    p 'hello'
  end
end

Actual behavior

This is the code that I get

def test_foo
if cond == true
p 'hello'
end
end

Steps to reproduce the problem

  1. Create a new file (set language to "Ruby")
  2. Type the following: "def test_foo" (press enter) -> no auto-tab
  3. Type "if cond == true" (press enter) -> no auto-tab
  4. Type "p 'hello'"
  5. Type "end" (press enter) -> You will note here, that the "end" does not auto-align with the "if"
  6. Type "end" (press enter) -> again, same thing, end should be aligned with the "def"

autocomplete not working inside methods

Your environment

  • vscode-ruby version: 0.8.0
  • Ruby version: 2.3.1p112
  • VS Code version: 1.5.3
  • Operating System: AntergosOS
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

when i use a variable and call autocomplete it should list all methods of this variable

Actual behavior

autocomplete work only if the variable is outside the method

Steps to reproduce the problem

[1, 2, 3].e => inside a method does nothing
[1, 2, 3].e => outside methods autocomplete works as expected

Cannot debug programs that read from STDIN

Your environment

  • vscode-ruby version: 0.6.0
  • Ruby version: 2.3.1
  • VS Code version: 1.5.0-insider
  • Operating System: MacOS

I'm trying to debug a basic Hello World app that requires basic console input (e.g. gets.chomp) via VSCode. The integrated Debug Console does not support user input so I'd like to launch an external console (this is supported in the Python and Node debuggers, for instance), but this does not seem to be currently supported. This would be a very nice feature for those getting started with Ruby who want to use VSCode.

Expected behavior

launch.json has a "externalConsole": true option in the configuration that launches an the console as an external window. This matches the Node debugger behavior.

Actual behavior

This option is not available so anything that uses gets will be blocked forever waiting for user input.

Indentation

Would it be possible to add indentation support?
That would be really great!

vscode-ruby 0.10.0 does not load

Your environment

  • vscode-ruby version: 0.10.0
  • Ruby version: 2.3.1
  • VS Code version: 1.6.0
  • Operating System: Linux Mint 18
  • Hardware (optional):

Expected behavior

Extension should be loaded and work

Actual behavior

Extension does not work. In the vscode log I see following:

threadService.ts:222[Extension Host] Activating extension `rebornix.Ruby` failed:  Cannot find module './lint/LintCollection'(anonymous function) @ threadService.ts:222
threadService.ts:222[Extension Host] Here is the error stack:  Error: Cannot find module './lint/LintCollection'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Function.N.n._load (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:13:19970)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/artem/.vscode/extensions/rebornix.Ruby-0.10.0/ruby.js:8:22)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)

Steps to reproduce the problem

  • Install vscode
  • install ruby extension
  • open development log of vscode
  • reload vscode

ARGV[0] returning 'undefined' instead of expected nil

Your environment

  • vscode-ruby version: 0.3.3
  • Ruby version: 2.2.4p230
  • VS Code version: 1.0.0
  • Operating System: windows 10
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

given this code

indexName = ARGV[0] || 'indexName'
typeName = ARGV[1] || 'typeName'
sourceFilename = ARGV[2] || 'sourceFileName'
puts " indexName: #{indexName}"
puts " typeName: #{typeName}"
puts "sourceFilename: #{sourceFilename}"

Expected behavior

 indexName: indexName
  typeName: typeName

sourceFilename: sourceFileName

Actual behavior

 indexName: undefined
  typeName: typeName

sourceFilename: sourceFileName

Steps to reproduce the problem

running included code through the commandline: ruby filename.rb works as expected
running debugging code through visualstudiocode ARGV[0] returns 'undefined' instead of nil.
to reproduce add ARGV[0], ARGV[1], ARGV[2] to watches...

Foreman start debugging

Your environment

  • vscode-ruby version: 0.9.0
  • Ruby version: 1.9.3-p374
  • VS Code version: 1.6.1
  • Operating System: Mac

Expected behavior

Debug a rails app using foreman

Actual behavior

I can't execute debug using foreman start

Cheers

Problem with debugger Process failed: spawn rdebug-ide ENOENT

Your environment

  • vscode-ruby version: 0.3.1
  • Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
  • VS Code version:
  • Operating System: Apricity OS
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Actual behavior

When I try to debug a rb file I receive following message
Debugger terminal error: Process failed: spawn rdebug-ide ENOENT
I'm receiving also this warning while I'm trying to install gems
WARNING: You don't have /root/.gem/ruby/2.3.0/bin in your PATH,
gem executables will not run.

Steps to reproduce the problem

Trouble passing arguments to script

Your environment

  • vscode-ruby version: 0.3.4
  • Ruby version: 1.9.3
  • VS Code version: 1.1.0
  • Operating System: Windows 10
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

I am trying to pass arguments to my script when running main.rb in debug mode and having trouble getting anything.

I am trying to capture them with ARGV array but it keeps coming in as empty. I thought at first to use the args array in the launch.json file, but realised this was passing parameters to the debugger.

Actual behavior

I have tried using the reuntimeArgs: node to read in my runtime parameters, but the array read by ARGV is always empty.

It's more about how to pass runtime script parameters into the ruby script to be picked up by ARGV?
{ "name": "Debug Local File", "type": "Ruby", "request": "launch", "program": "${workspaceRoot}/main.rb",

I have tried
"runtimeArgs": [ "--MyParam1 testvalue1", "--MyParam2 testvalue2" ]

I have tried
"runtimeArgs": [ "--MyParam1 testvalue1 --MyParam2 testvalue2" ]

And I have tried
"runtimeArgs": [ "--MyParam1", "testvalue1", "--MyParam2", "testvalue2" ]

Steps to reproduce the problem

Can you please give me an indication of how to pass these parameters to the main.rb

Thanks
Brett

Unable to install gem ruby-debug-ide

Your environment

  • vscode-ruby version: 0.8
  • Ruby version: 2.3.0
  • VS Code version: 1.5.3
  • Operating System: Arch Linux
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

I'm trying to install ruby-debug-ide but it does not work:

~ gem install ruby-debug-ide -v 0.4.32
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.

current directory: /home/c0m3tx/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.4.32/ext
/usr/bin/ruby mkrf_conf.rb
Installing base gem
You don't have write permissions for the /usr/lib/ruby/gems/2.3.0 directory.
/usr/lib/ruby/2.3.0/rubygems/installer.rb:685:in `verify_gem_home'
   /usr/lib/ruby/2.3.0/rubygems/installer.rb:805:in `pre_install_checks'
   /usr/lib/ruby/2.3.0/rubygems/installer.rb:272:in `install'
   /usr/lib/ruby/2.3.0/rubygems/request_set.rb:167:in `block in install'
   /usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:in `each'
   /usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:in `install'
   /usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
   mkrf_conf.rb:35:in `rescue in <main>'
   mkrf_conf.rb:28:in `<main>'

I tried installing it as root but then I can't access the binary (which is located in /root/.gem/ruby/2.3.0/bin).
I tried putting the gem in my Gemfile but does not work (same error)

Why does it try to write in /usr/lib? Any way to bypass this behavior?
Thanks in advance

Rspec can not execute 'it'

Your environment

  • vscode-ruby version: 0.5.3
  • Ruby version: ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]
  • VS Code version: 1.4.0
  • Operating System: Windows 7 Professional
  • rspec (3.5.0)
  • ruby-debug-ide (0.6.1.beta2, 0.6.0, 0.5.0, 0.4.32)
  • debase (0.2.1)
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

execute rspec test

Actual behavior

executed everythiing except 'it'

Steps to reproduce the problem

rspec test code :

describe 'Utils' do

  puts 1111
  describe '#time_condition' do
    puts 2221
    it do
      puts 'aaa'
    end
    puts 2223
  end
end

launch.json :

...
    {
      "name": "RSpec - all",
      "type": "Ruby",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "program": "${workspaceRoot}/spec/*_rspec.rb",
      "args": [
        "--require",
        "spec_helper",
        "--require",
        "rails_helper",
        "--format",
        "documentation"
      ]
    },
...

When I run test on vscode, got

1111
2221
2223

when I run test by command, got

>rspec spec --pattern *_rspec.rb
1111
2221
2223
aaa
.

Finished in 0.003 seconds (files took 0.23602 seconds to load)
1 example, 0 failures

by the way, spec config files (generated by rspec --init) :

.rspec
--color
--require spec_helper
spec\spec_helper.rb
RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.profile_examples = 10

  config.order = :random

  Kernel.srand config.seed
end

[Ruby] Unable to debug .rb file and getting debugger terminal error.

VSCode Version: 0.10.12-alpha
•OS Version: Windows10 -Ruby Version: rubyinstaller-2.2.4-x64 (install location : http://rubyinstaller.org/downloads/)

Steps to Reproduce:

  1. Launch app and open a folder which contains .rb file.
  2. Install all the ruby extensions and restart app.
  3. Add some break point in .rb file.
  4. Debug .rb file with option "Debug local file"

Actual: Getting Error like : Debugger terminal error: Process failed: spawn rdebug-ide.bat ENOENT
image

Autocomplete not working with Rails/Rbenv

Your environment

  • vscode-ruby version: 0.9.0
  • Ruby version: 2.3.1p112
  • VS Code version: 1.6.0
  • Operating System: OS X El Captain
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

When I type [1, 2, 3].e inside a Rails model/controller is expected to trigger autocomplete.

Actual behavior

Actually nothing happens in editor. In dev degub console show the following error:

shell.ts:441 /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:166:in `runtime_data_with_class': -:1:in `<main>': uninitialized constant ActiveRecord (NameError) (Rcodetools::ProcessParticularLine::NewCodeError)
    from /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:287:in `candidates_with_class'
    from /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:295:in `candidates'
    from /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:313:in `completion_code'
    from /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:206:in `run'
    from /Users/guiloyins/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rcodetools-0.8.5.0/bin/rct-complete:45:in `<top (required)>'
    from /Users/guiloyins/.rbenv/versions/2.3.1/bin/rct-complete:22:in `load'
    from /Users/guiloyins/.rbenv/versions/2.3.1/bin/rct-complete:22:in `<main>'

If the file edited is a regular ruby file the autocomplete works as expected.

Steps to reproduce the problem

Setup a rails project with rbenv. Inside a controller, model and etc, and follow the steps on docs.
I don't know if I am doing something wrong and there is so little information about rcodetools and rails/rbenv on internet.

GoTo definition seems very crude

Your environment

  • vscode-ruby version: 0.9.0
  • Ruby version: 2.3.1p112
  • VS Code version: 1.6.1
  • Operating System: Ubuntu 16.04

Behavior

Using the files below I hit F12 to goto definition - I'm execting the cursor to jump 2 lines up, but instead I'm taken to a different file that has a function with a name clash

Steps to reproduce the problem

I've created a project with two files: hest.rb/horse.rb. One is not included in the other and there is a variable name that has a name clash.

hest.rb

module Hest
  # something
  class MyClass
    def self.hest(filename, opts = {})
      content_hash = opts['content_hash']
      puts filename
      puts content_hash
    end
  end
end

horse.rb

def content_hash
   'asdf'
end

GoTo Definition Stopped Working Between 0.9 and 0.10

Your environment

  • vscode-ruby version: 0.10
  • Ruby version: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
  • VS Code version: 1.6.1
  • Operating System: El Capitan
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Right clicking on a function will show "goto definition" and "peek definition"

Actual behavior

Right clicking on a function shows "Change all occurences", "cut", "copy", and "paste" only.

Steps to reproduce the problem

Upgrade from Ruby 0.9x to Ruby 0.10x
No configuration was changed between the upgrade

IntelliSense dropdown when pressing dot

Your environment

  • vscode-ruby version: 0.6.0
  • Ruby version: 2+
  • VS Code version: insiders 1.6
  • Operating System: osx
  • Hardware (optional):

I installed rcodetools per the extension readme.

Assume the following code:

x = "hello"
x.

Expected behavior

I expect the IntelliSense list to appear when i press .

Actual behavior

I have to type in a character that matches something in the IntelliSense list (for example c for capitalize, but x doesn't do anything) or press Ctrl+Space to get IntelliSense to appear. Languages such as JavaScript and TypeScript show the list on .

Run VS Code with admin privileges so the changes can be applied.

Your environment

  • vscode-ruby version: 0.5.3
  • Ruby version: 2.3.1
  • VS Code version: 1.4.0
  • Operating System: macOS El Capitan
  • Hardware (optional):

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Autocomplete

Actual behavior

After install the latest vscode-ruby, autocomplete doesn't show any result, and get a error info:

Run VS Code with admin privileges so the changes can be applied.

screen shot 2016-08-27 at 8 41 25 am

After restarting VSCode or reinstall the extension, the problem still remains.

When I use sudo code to run VSCode, the autocomplete works, but VSCode itself warns me not to run it in root mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.