Eslam
Eslam

Reputation: 1653

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

Upvotes: 3

Views: 2057

Answers (2)

Thilo
Thilo

Reputation: 17735

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.

Upvotes: 1

dnch
dnch

Reputation: 9605

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/

Upvotes: 1

Related Questions