Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4109

Show
Ignore:
Timestamp:
04/01/06 04:58:46 (3 years ago)
Author:
ulysses
Message:

Teach Rails apps to only load gems of the same Rails version they were generated with.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r4100 r4109  
    11*SVN* 
     2 
     3* Teach Rails apps to only load gems of the same Rails version they were generated with. [Nicholas Seckar] 
    24 
    35* Added expiration settings for JavaScript, CSS, HTML, and images to default lighttpd.conf [DHH] 
  • trunk/railties/environments/boot.rb

    r3231 r4109  
    1414else 
    1515  require 'rubygems' 
    16   require 'initializer' 
     16  required_version = '<%= Rails::VERSION::STRING %>' 
     17  rails_gem = Gem.cache.search('rails', "=#{required_version}").first 
     18  unless rails_gem 
     19    STDERR.puts "Cannot find gem for Rails =#{required_version}. Install missing gem or change config/boot.rb." 
     20  end 
     21  require rails_gem.full_gem_path + '/lib/initializer' 
    1722end 
    1823 
  • trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb

    r4033 r4109  
    4444 
    4545      # Environments 
    46       m.file "environments/boot.rb",        "config/boot.rb" 
     46      m.template "environments/boot.rb",    "config/boot.rb" 
    4747      m.file "environments/environment.rb", "config/environment.rb" 
    4848      m.file "environments/production.rb",  "config/environments/production.rb"