几天
前我对我的bash个人资料进行了一些编辑,然后去创建一个新的rails应用程序,然后弹出了此错误。我不太确定问题是什么或为什么事情没有正确路由,我以为我已经解决了它。我还包括了我的新 bash 个人资料和我的旧个人资料。我删除了旧的,因为它看起来像是疯狂地重复自己。
我跑
$ rails new newapp
/usr/local/bin/rails:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
哪个宝石
$ which gem
/Users/LMagnotti/.rvm/rubies/ruby-2.2.4/bin/gem
哪个导轨
which rails
/usr/local/bin/rails
宝石环境
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.2.4 (2015-12-16 patchlevel 230) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /Users/LMagnotti/.rvm/gems/ruby-2.2.4
- RUBY EXECUTABLE: /Users/LMagnotti/.rvm/rubies/ruby-2.2.4/bin/ruby
- EXECUTABLE DIRECTORY: /Users/LMagnotti/.rvm/gems/ruby-2.2.4/bin
- SPEC CACHE DIRECTORY: /Users/LMagnotti/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/LMagnotti/.rvm/rubies/ruby-2.2.4/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-15
- GEM PATHS:
- /Users/LMagnotti/.rvm/gems/ruby-2.2.4
- /Users/LMagnotti/.rvm/gems/ruby-2.2.4@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/LMagnotti/.rvm/gems/ruby-2.2.4/bin
- /Users/LMagnotti/.rvm/gems/ruby-2.2.4@global/bin
- /Users/LMagnotti/.rvm/rubies/ruby-2.2.4/bin
- /usr/local/bin
- /usr/local/sbin
- ~/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Users/LMagnotti/.rvm/bin
- above/path/to/gems
新的 Bash 配置文件
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
PATH=$PATH:above/path/to/gems
source ~/.rvm/scripts/rvm
老巴什简介
export PATH=/Users/LMagnotti/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/LMagnotti/.rvm/bin:/Lmagnotti/mongodb/bin:/Users/lmagnotti/mongodb/bin
PATH 分配中的~
不会展开。 在这种情况下,您可以使用${HOME}
而不是~
。
PATH
变量中的相对above/path/to/gems
是怎么回事? 你确定要这样做吗?
我怀疑其中一个导致了问题,或者实际上需要您从原始 PATH 表达式中删除的路径之一。