我意识到有很多与此相同的问题,但是我在解决问题上没有成功。我正在尝试使用gem'vpn',出于学习目的,我认为我会打开一个全新的项目。按照https://github.com/ronen/vpn(该宝石也位于rubygems.org)上的安装说明进行操作,并在我的代码中要求该宝石,我得到require': cannot load such file -- vpn (LoadError)
。
我已经验证了我的版本。 gem env
给予
RubyGems Environment:
- RUBYGEMS VERSION: 2.7.7
- RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-darwin17]
- INSTALLATION DIRECTORY: /Users/user/.rvm/gems/ruby-2.5.1
- USER INSTALLATION DIRECTORY: /Users/user/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /Users/user/.rvm/rubies/ruby-2.5.1/bin/ruby
- EXECUTABLE DIRECTORY: /Users/user/.rvm/gems/ruby-2.5.1/bin
- SPEC CACHE DIRECTORY: /Users/user/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/user/.rvm/rubies/ruby-2.5.1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-17
- GEM PATHS:
- /Users/user/.rvm/gems/ruby-2.5.1
- /Users/user/.rvm/gems/ruby-2.5.1@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/user/.rvm/gems/ruby-2.5.1/bin
- /Users/user/.rvm/gems/ruby-2.5.1@global/bin
- /Users/user/.rvm/rubies/ruby-2.5.1/bin
- /Users/user/.rvm/bin
- /Library/Frameworks/Python.framework/Versions/3.7/bin
- /Library/Frameworks/Python.framework/Versions/3.7/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Applications/Wireshark.app/Contents/MacOS
ruby --version
给出ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
在我的gem文件中,我有gem: 'vpn'
gem list
确实返回vpn (0.2.1)
任何帮助将不胜感激。预先感谢。
我尝试过的事情:
PS我没有rake文件。我尚未设置一个,因为我不太完全确定它是否可以解决我的问题,而我在寻找如何创建一个问题上遇到了问题。