Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby On Rails - Where to gems actually go

Tags:

rubygems

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.

like image 256
Chris Muench Avatar asked Feb 24 '11 16:02

Chris Muench


2 Answers

in your console use command:

gem env

There will be INSTALLATION DIRECTORY

like image 112
m4risU Avatar answered Oct 04 '22 03:10

m4risU


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

like image 42
Mike A. Avatar answered Oct 04 '22 04:10

Mike A.