Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run napa console (Napa v0.3.0) #172

Closed
dkarter opened this issue Jan 21, 2015 · 4 comments
Closed

Cannot run napa console (Napa v0.3.0) #172

dkarter opened this issue Jan 21, 2015 · 4 comments

Comments

@dkarter
Copy link
Contributor

dkarter commented Jan 21, 2015

Not sure if this is a bug but i'm getting this on two of my servers when trying to run napa console.

 $ napa console
WARN: Unresolved specs during Gem::Specification.reset:
      rake (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- readline (LoadError)
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/lib/napa/cli.rb:43:in `rescue in console'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/lib/napa/cli.rb:38:in `console'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/bin/napa:5:in `<top (required)>'
    from /home/deploy/.rbenv/versions/2.1.2/bin/napa:23:in `load'
    from /home/deploy/.rbenv/versions/2.1.2/bin/napa:23:in `<main>'
FAIL

I tried gem cleanup rake but it didn't work.

Also I tried updating the napa gem on an existing project and that just made my api no longer work (but that may be a separate issue) so I'm stuck with napa v0.3.0 for now.

Thanks!

@shaqq
Copy link
Contributor

shaqq commented Jan 21, 2015

Are you using bundler? Does bundle exec napa console fix it?

@dkarter
Copy link
Contributor Author

dkarter commented Jan 21, 2015

With bundle exec:

 $ bundle exec napa console production
/home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/lib/napa/cli.rb:43:in `require'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/lib/napa/cli.rb:43:in `rescue in console'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/lib/napa/cli.rb:38:in `console'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/napa-0.3.0/bin/napa:5:in `<top (required)>'
    from /home/deploy/.rbenv/versions/2.1.2/bin/napa:23:in `load'
    from /home/deploy/.rbenv/versions/2.1.2/bin/napa:23:in `<main>'
FAIL

@shaqq
Copy link
Contributor

shaqq commented Feb 4, 2015

@dkarter your ruby needs to be compiled with readline support. We should add a check for readline support, like they do in pry:

https://github.com/pry/pry/blob/5101cd4e34d905e10a218b01fb355668bf2fec21/lib/pry/config/default.rb#L150

@dkarter
Copy link
Contributor Author

dkarter commented Feb 4, 2015

Thanks for looking into this! I can confirm this was the issue.
First I tried installing the rb-readline gem as suggested in the pry code but that didn't work for Napa.
This article helped me solve the issue: http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants