简体   繁体   中英

how to install gem in vendor without affecting installed gems in the system

i want to know how to install a specific gem with a certain version in rails app vendor so as not to affect other gems installed in the whole system as the server holds lots of rails project with different gems' specifications

The simplest answer is to just use Bundler to manage all your gems. That way, you're protected if the versions installed on the server change.

You can get more information here: http://gembundler.com/

Just install it as a plugin. So if it's hosted on github, for example:

rails plugin install "path_to_git"

or with Rails < 3

script/plugin install "path_to_git"

But Dan is right, a much better approach is to use rvm and bundler . If you have lots of rails projects as you say, this will save you a TON of version conflict headaches down the road.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM