rderoldan1
rderoldan1

Reputation: 4078

Install Rails Gems

In my company the production servers aren't connected to internet, so when we try to put our rails apps in those servers I can't make it woks because obviously the can't bundle the gems, My question is, can I distribute the gems inside my app?

Upvotes: 1

Views: 82

Answers (2)

sockmonk
sockmonk

Reputation: 4255

You can also run your own internal gem server at your company. Copy just the gems your company uses to your gem server, as well as any gems developed internally. In your app's gemfile, just add source to use it:

source "http://rubygems.my_example_company.com"

It can be as easy as running 'gem server' on the gem server, or using something like the Gem in a Box project. See http://guides.rubygems.org/run-your-own-gem-server/ for more information on setting it up.

Upvotes: 0

Carlos Drew
Carlos Drew

Reputation: 1633

You can use bundler to install your gems to the rails application vendor/gems directory:

$ bundle install vendor/gems

Alternately:

$ bundle package

References:
How do I freeze gems into a Rails 3 application?
bundler install
bundle package

Upvotes: 2

Related Questions