This is a noob question:
How do I add gems to my rails app in a way that I can just copy my app's directory structure to a remote location and have it just work, with all the gems I depend on installed and available?
This is a noob question:
How do I add gems to my rails app in a way that I can just copy my app's directory structure to a remote location and have it just work, with all the gems I depend on installed and available?
gems path in a directory is
RAILS_ROOT/vendor/gems
you have to freeze/unpack all the gems used in this directory
Rails gems and there dependancies path will be
RAILS_ROOT/vendor/rails
And all plugins path should be
RAILS_ROOT/vendor/plugins
By default Rails load the gems form the machine (or you can say local). to load gems from the gems directory you have to add following code in tour config/enviorment.rb
config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir|
File.directory?(lib = "#{dir}/lib") ? lib : dir
end