- System-Wide Location (/usr/local/lib/ruby/gems/2.0.0/gems)
- User-Home Location, in Opsworks its Deploy user (/home/deploy/.bundler/galaxylifecms/ruby/2.0.0/gems)
The GEMS listed in Gemfile are installed in the User-Home location by Bundler
If you need to execute a custom ruby script like
Chances are high that you would run into GEM dependencies errors even though you had mentioned all the required GEMS in Gemfile.
To verify if the GEM in error have been installed by bundler or not,
# grep gem_name Gemfile.lock
IF it exist , then the issue is the custom ruby script is pickingup up the wrong environment ie System-Wide location and not User-Home location.
#bundle exec rake my_custom_script
The “bundle exec” will ensure the custom rake task picks up the GEM used by the Bundler environment.