Methods

GemInstallerRailsPreinitializer

Public Class Methods

preinitialize() click to toggle source
    # File lib/geminstaller_rails_preinitializer.rb, line 16
16:     def preinitialize
17:       args = ''
18: 
19:       # Specify --geminstaller-output=all and --rubygems-output=all for maximum debug logging
20:       # args += ' --geminstaller-output=all --rubygems-output=all'
21: 
22:       # The 'exceptions' flag determines whether errors encountered while running GemInstaller
23:       # should raise exceptions (and abort Rails), or just return a nonzero return code
24:       args += " --exceptions" 
25: 
26:       # This will use sudo by default on all non-windows platforms, but requires an entry in your
27:       # sudoers file to avoid having to type a password.  It can be omitted if you don't want to use sudo.
28:       # See http://geminstaller.rubyforge.org/documentation/documentation.html#dealing_with_sudo
29:       # Note that environment variables will NOT be passed via sudo!
30:       #args += " --sudo" unless RUBY_PLATFORM =~ /mswin/
31: 
32:       # The 'install' method will auto-install gems as specified by the args and config
33:       # IMPORTANT NOTE:  Under recent RubyGems versions, this will install to ~/.gem
34:       # The forking is a workaround to 'check_for_upgrade' in the configuration file, which causes
35:       # script/console crashes on Mac OS X. See http://www.ruby-forum.com/topic/101243 for details
36:       # It is probably best not to install from preinitializer - it has known problems
37:       # under Passenger, and you should be installing your gems before you initialize rails anyway,
38:       # via capistrano, chef, or some other mechanism.  So, it is commented for now.
39:       # pid = fork do
40:       #   GemInstaller.install(args)
41:       # end
42:       # Process.wait(pid)
43: 
44:       # The 'autogem' method will automatically add all gems in the GemInstaller config to your load path,
45:       # using the rubygems 'gem' method.  Note that only the *first* version of any given gem will be loaded.
46:       GemInstaller.autogem(args)
47:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.