Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the Ruby analogue of npm link?

Tags:

ruby

bundler

gem

If you the source for a Nodejs project, the command npm link installs it in such a way that any changes you make apply everywhere without you having to reinstall.

npm link is designed to install a development package and see the changes in real time without having to keep re-installing it.

https://www.npmjs.org/doc/misc/npm-developers.html#link-packages

Is there a analogue for Ruby projects?

like image 872
Colonel Panic Avatar asked Oct 12 '14 18:10

Colonel Panic


1 Answers

The Ruby equivalent is to use the :path option when specifying a gem in your Gemfile. It would look something like this.

gem "mylocalgem", :path => "/path/to/local/gem/dir/"

If you are trying to do this globally on the default system ruby then you can do one of the following.

gem install --local path_to_gem/filename.gem

or just run the following from the directory where the .gem file exists and it will be picked up.

gem install
like image 138
bigtunacan Avatar answered Oct 03 '22 13:10

bigtunacan