2016-10-05 28 views
0

我目前在Rails應用程序上運行ruby,並且正在使用Rubymine進行調試。我怎樣才能在rails應用程序上設置一個ruby以便在VSCode中用rvm進行調試

It's使用RVM有自己的寶石(設置爲默認值紅寶石2.3.1)

當我嘗試用VSCode設置此我不能讓它運行,收到以下消息:

<home>/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x73d0d4 bundler-1.13.1> (NoMethodError) 
    from <home>/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path' 

我在VSCode配置如下:

{ 
      "name": "Rails server", 
      "type": "Ruby", 
      "request": "launch", 
      "cwd": "${workspaceRoot}", 
      "program": "${workspaceRoot}/bin/rails", 
      "args": [ 
       "server", 
       "-b 0.0.0.0", 
       "-p 3000", 
       "-e development" 
      ] 
     } 

任何提示?

回答

1

我終於找到它了!

看來,捆綁機版本1.13導致這種情況發生。安裝以前的版本的竅門。

gem uninstall bundler -v1.13 

gem install -v 1.12 
相關問題