Я получил новую машину и установил свежую rbenv (я всегда использовал rvm раньше). Этот драгоценный камень теперь не загружается в мое приложение. Я не сделал никаких изменений кода. Единственная разница между сейчас и тогда - это rbenv.
Loading development environment (Rails 5.2.1)
irb(main):001:0> SportsApi::Fetcher::Score::NBA
Traceback (most recent call last):
1: from (irb):1
NameError (uninitialized constant SportsApi::Fetcher)
Интересно, что если я клонирую драгоценный камень на свой локальный компьютер, а затем изменяю путь в Gemfile, он ДОЛЖЕН загружаться / работать.
# gem 'sports_api', git: 'git@github.com:mikesilvis/sports_api.git'
gem 'sports_api', path: '~/dev/sports_api'
irb(main):001:0> SportsApi::Fetcher::Score::NBA
=> SportsApi::Fetcher::Score::NBA
Почему это работает на локальном пути, а не на пути git? Любые идеи о том, что я могу сделать, чтобы исправить это (использовать путь git)? Заранее спасибо.
Редактировать: Вот полный след.
uninitialized constant SportsApi::Fetcher
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `block in load_missing_constant'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `rescue in load_missing_constant'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:56:in `load_missing_constant'
(irb):2:in `irb_binding'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/workspace.rb:85:in `eval'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/workspace.rb:85:in `evaluate'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/context.rb:380:in `evaluate'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:491:in `block (2 levels) in eval_input'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:623:in `signal_status'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:488:in `block in eval_input'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/ruby-lex.rb:246:in `block (2 levels) in each_top_level_statement'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/ruby-lex.rb:232:in `loop'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/ruby-lex.rb:232:in `block in each_top_level_statement'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/ruby-lex.rb:231:in `catch'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb/ruby-lex.rb:231:in `each_top_level_statement'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:487:in `eval_input'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:428:in `block in run'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:427:in `catch'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:427:in `run'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/2.5.0/irb.rb:383:in `start'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/console/console_command.rb:64:in `start'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/console/console_command.rb:19:in `start'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands/console/console_command.rb:96:in `perform'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/Users/myusername/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
bin/rails:4:in `<main>'