Ruby On Rails - Where to gems actually go

2019-03-26 17:49发布

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 through the rails tutorial, but it seemed to leave out those important details.

标签: rubygems
2条回答
Viruses.
2楼-- · 2019-03-26 18:24

in your console use command:

gem env

There will be INSTALLATION DIRECTORY

查看更多
时光不老,我们不散
3楼-- · 2019-03-26 18:38

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).

查看更多
登录 后发表回答