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

Ticket #8554 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

Autogenerated syntax error "boot.rb" line 28: produces "gem ..." instead of "require_gem ..."

Reported by: jbiard Assigned to: core
Priority: normal Milestone: 1.2 regressions
Component: Plugins Version: edge
Severity: normal Keywords: boot.rb, rails generator
Cc:

Description

Rails 1.2.3 on OSx 10.4.9 using Ruby 1.8.4 after fresh update using "gem update rails" and creating a fresh Rails application the code generated for boot.rb appears to throw a syntax error on generated line 29.

$ ruby boot.rb
boot.rb:29: undefined method `gem' for main:Object (NoMethodError)

Rails generated:

...
if rails_gem

gem "rails", "=#{rails_gem.version.version}"
require rails_gem.full_gem_path + '/lib/initializer'

else
...

Should have generated:

...
if rails_gem

require_gem "rails", "=#{rails_gem.version.version}"
require rails_gem.full_gem_path + '/lib/initializer'

else
...

Change History

06/02/07 20:32:34 changed by bitsweat

  • status changed from new to closed.
  • resolution set to invalid.

gem update --system to upgrade your RubyGems