Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

config.ru not updated when upgrading from 3.0.0.beta4 to 3.0.0.rc

#5273

When upgrading a rails application from version 3.0.0.beta4 to 3.0.0.rc, the config.ru file is not updated when running rake rails:update.

The line run MyApplication::Application isn't changed to run Config::Application, which results in an NameError being raised when you start the rails server.

/Users/hj/Documents/reproduce/my_application/config.ru:4: uninitialized constant MyApplication (NameError)
    from /Users/hj/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
    from /Users/hj/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
    from /Users/hj/Documents/reproduce/my_application/config.ru:1:in `new'
    from /Users/hj/Documents/reproduce/my_application/config.ru:1

The file config.ru should be change to:

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run Config::Application

Reported by Harm-Jan Blok · August 2nd, 2010 @ 11:07 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to invalid
    • Importance changed from to Low

    It should actually remain MyApplication and not change to Config. The application name changes to config on running rake rails:update in Rails 3 RC is because of a bug. The associated ticket is #5207 and it has been fixed in Rails master here http://github.com/rails/rails/commit/5d3e8ee2bdd2225fe6e610c7e465bb...

    August 2nd, 2010 @ 11:39 AM

  2. Harm-Jan Blok
    Harm-Jan Blok

    Okay thanks for the fix. Forgot to search for rake rails:update within the existing tickets (should have done that).

    August 2nd, 2010 @ 12:43 PM