尝试加载宝石'pry-rails'时出错

时间:2017-03-30 14:41:51

标签: ruby heroku bundler pry-rails

我不熟悉Ruby,但无论如何我都试图安装和测试iQvoc(https://github.com/innoq/iqvoc)。 在一些初始问题之后,我设法用heroku安装它。 我现在正在尝试导出一个小的测试词库但我在Ruby上遇到了一些问题。 我用这个命令:

rake --trace iqvoc:export TYPE=ttl NAMESPACE='http://namespace.example.fr/'

我得到了结果:

rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'pry-rails'.
Gem Load Error is: uninitialized constant Pry::Prompt
Backtrace for gem load error is:
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails/prompt.rb:36:in `<module:PryRails>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails/prompt.rb:1:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails.rb:10:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/home/nicola/iqvoc_2/config/application.rb:23:in `<top (required)>'
/home/nicola/iqvoc_2/Rakefile:20:in `require'
/home/nicola/iqvoc_2/Rakefile:20:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `load'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `<main>'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `eval'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `<main>'
Bundler Error Backtrace:
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/home/nicola/iqvoc_2/config/application.rb:23:in `<top (required)>'
/home/nicola/iqvoc_2/Rakefile:20:in `require'
/home/nicola/iqvoc_2/Rakefile:20:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `load'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `<main>'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `eval'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `<main>'
NameError: uninitialized constant Pry::Prompt
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails/prompt.rb:36:in `<module:PryRails>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails/prompt.rb:1:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/pry-rails-0.3.5/lib/pry-rails.rb:10:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/home/nicola/iqvoc_2/config/application.rb:23:in `<top (required)>'
/home/nicola/iqvoc_2/Rakefile:20:in `require'
/home/nicola/iqvoc_2/Rakefile:20:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/home/nicola/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `load'
/home/nicola/.rbenv/versions/2.4.0/bin/rake:22:in `<main>'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `eval'
/home/nicola/.rbenv/versions/2.4.0/bin/ruby_executable_hooks:15:in `<main>'

我正在使用ubuntu 14.0.6和ruby 2.4

有什么想法吗?

1 个答案:

答案 0 :(得分:4)

我使用jazz_hands在Rails 3项目中遇到了类似的错误。这只是在黑暗中拍摄,但试试这个:

bundle update pry-rails pry-remote pry-byebug

然后查看错误是否已修复。