Skip to content

Commit

Permalink
added support for local gems use in config/environment.rb. Helpful in…
Browse files Browse the repository at this point in the history
… production server without root access
  • Loading branch information
Alexander Pupeikis committed Mar 1, 2011
1 parent 159ae29 commit d261ec1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

# Required to use local gems inside the users home directory. Maybe helpful in production server
# without root access. However, for RAILS_GEM_VERSION = '2.3.8' these should to be located before the
# "require File.join(File.dirname(__FILE__), 'boot')" line
if ENV['RAILS_ENV'] == 'production' # don't bother on dev
ENV['GEM_PATH'] = File.expand_path('~/.gems') + ':/usr/lib/ruby/gems/1.8'
end

Rails::Initializer.run do |config|
# config.gem "aws-s3", :lib => "aws/s3"
# config.gem 'grit'
Expand Down

0 comments on commit d261ec1

Please sign in to comment.