我已使用api_auth
gem install api_auth
但是当我尝试运行require api_auth
的文件时,它告诉我它已丢失:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- active_support/dependencies (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/api_auth-0.0.2.4/lib/api_auth.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /Users/thomasbentkowski/Documents/misc/apisandbox.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/pry_class.rb:91:in `block in load_requires'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/pry_class.rb:90:in `each'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/pry_class.rb:90:in `load_requires'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/pry_class.rb:128:in `initial_session_setup'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/cli.rb:206:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/cli.rb:83:in `call'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/cli.rb:83:in `block in parse_options'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/cli.rb:83:in `each'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/lib/pry/cli.rb:83:in `parse_options'
from /Library/Ruby/Gems/2.0.0/gems/pry-0.10.4/bin/pry:16:in `<top (required)>'
from /usr/local/bin/pry:23:in `load'
from /usr/local/bin/pry:23:in `<main>'
以下是gem environment
- RUBYGEMS VERSION: 2.0.14.1
- RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-16
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /Users/thomasbentkowski/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
答案 0 :(得分:2)
api_auth
旨在用于Rails。看起来你正在用pry加载一个ruby脚本。无论您在哪里使用require 'active_support'
api_auth