Ruby On Rails - Where to gems actually go

前端 未结 2 1200
时光取名叫无心
时光取名叫无心 2021-02-15 10:40

When I do sudo gem install XYZ where does that code actually go? Are gems written in ruby on another language?

When I do bundle install, what does that do? I read throug

相关标签:
2条回答
  • 2021-02-15 11:15

    in your console use command:

    gem env
    

    There will be INSTALLATION DIRECTORY

    0 讨论(0)
  • 2021-02-15 11:24

    The command

    bundle install
    

    installs the gems listed in your Gemfile. If you are installing gems using bundle, you can type

    bundle show <gem name>
    

    to see the directory that it is installed in. If I were you I'd navigate to one of those directories and view the code -- it's usually ruby code (but can sometimes involve C). (Look in the 'lib' subdir first -- that's where most of the code usually is).

    0 讨论(0)
提交回复
热议问题