dgutov / robe

Code navigation, documentation lookup and completion for Ruby
584 stars 37 forks source link

'Cannot load such file - pry' on robe-start #69

Closed feoh closed 9 years ago

feoh commented 9 years ago

Here's the full stack trace:

irb(main):001:0> LoadError: cannot load such file -- pry
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe/sash/doc_for.rb:1:in `require'
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe/sash/doc_for.rb:1:in `<top (required)>'
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe/sash.rb:1:in `require'
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe/sash.rb:1:in `<top (required)>'
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe.rb:1:in `require'
    from /Users/cpatti/.emacs.d/elpa/robe-20150430.1724/lib/robe.rb:1:in `<top (required)>'
    from (irb):1:in `require'
    from (irb):1
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/cli/console.rb:38:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:286:in `console'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/command.rb:27:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor.rb:363:in `dispatch'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/base.rb:440:in `start'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:9:in `start'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/bin/bundle:20:in `block in <top (required)>'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
    from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/bin/bundle:18:in `<top (required)>'
    from /opt/chefdk/embedded/bin/bundle:23:in `load'
    from /opt/chefdk/embedded/bin/bundle:23:in `<main>'irb(main):002:0> 

This is with ChefDK 0.5.1 on OSX.

Maybe emacs is having a hard time with the PATH? I can run 'pry' from a shell or even eshell within emacs.

dgutov commented 9 years ago

The pry you can run from the shell is irrelevant: it's an executable, not a library.

Like README says, you have to add the dependencies to Gemfile. Does ChefDK have a Gemfile you can edit?

feoh commented 9 years ago

@dgutov This is a Chef project. We don't use Gemfiles and we're not using Bundler. Maybe I was being overly ambitious hoping for Ruby completion in a Chef project.

dgutov commented 9 years ago

We don't use Gemfiles and we're not using Bundler.

Are you sure about that? The backtrace you provided contains the word "bundler" many times.

Maybe I was being overly ambitious hoping for Ruby completion in a Chef project.

That may be true as well. I haven't tried doing that myself. As you can see, Chef provides its own embedded Ruby runtime, so that complicates things.

feoh commented 9 years ago

Actually, pry is bundled with ChefDK, so now I'm totally confused :) Thanks a bunch for responding. Guessing this is something environment related and not Robe's fault. Buh, and I'd so hoped to have nice completion for my Chef code :)