0

在我的 rails 应用程序中运行任何 rake 命令时,我遇到了一些问题:

humberto@asterix:/var/www/avante-q-a$ rake db

/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:11: warning: already initialized constant DEFAULT_HOOKS
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:23: warning: already initialized constant DEFAULT_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:48: warning: already initialized constant SIMPLE_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:57: warning: already initialized constant CLIPPED_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:62: warning: already initialized constant DEFAULT_EXCEPTION_HANDLER
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:68: warning: already initialized constant DEFAULT_EXCEPTION_WHITELIST
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:71: warning: already initialized constant DEFAULT_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:82: warning: already initialized constant SIMPLE_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:84: warning: already initialized constant SHELL_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:91: warning: already initialized constant NAV_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:107: warning: already initialized constant DEFAULT_CONTROL_D_HANDLER
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:121: warning: already initialized constant DEFAULT_SYSTEM
rake aborted!
cannot load such file -- pry/nav

(See full trace by running task with --trace)

我已经运行了 bundle install 并且它成功了。有人知道这里缺少什么吗?从现在开始感谢。

4

1 回答 1

1

您应该尝试在捆绑程序上下文中重新运行它:

bundle exec rake db

Bundle exec 首先加载 bundler 并在加载 rake 之前将所有 gem 挂接到当前环境中。

于 2013-02-02T20:21:50.033 回答