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.

Enhancement Request: generate application using previous Rails version

#3923

After installing Rails 3.0 beta, it's a bit cumbersome to target a previous version of the framework. Thus, I propose that the following option be added to the rails command:

-u, [--use=RAILS_VERSION] # Rails framework version to use to generate application.

e.g.

rails --use=2.3.5 -d database_engine application_name
rails -u 2.3.5 -d database_engine application_name

Reported by Conrad Taylor · February 10th, 2010 @ 03:40 PM

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

Activity

  1. Matt Jones
    Matt Jones

    Does the standard gem wrapper method:

    rails _2.3.5_ ...args...
    

    Not work for this case?

    February 10th, 2010 @ 05:29 PM

  2. Conrad Taylor
    Conrad Taylor

    After trying the standard gem wrapper, I'm seeing the following issue:

    
    $ rvm ruby-head
    
    $ ruby -v
    ruby 1.9.2dev (2010-01-18 trunk 26340) [powerpc-darwin9.8.0]
    
    $ gem list rails
    
    *** LOCAL GEMS ***
    
    rails (3.0.0.beta, 3.0.pre, 2.3.5)
    
    $ gem list rails
    
    *** LOCAL GEMS ***
    
    rails (3.0.0.beta, 2.3.5)
    
    $ rails _2.3.5_ blog235
    /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:827:in `report_activate_error': RubyGem version error: railties(3.0.pre not = 2.3.5) (Gem::LoadError)
        from /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:261:in `activate'
        from /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:68:in `gem'
        from /Users/conradwt/.rvm/gems/ruby-head/bin/rails:18:in `<main>'
    
    $ rvm system
    
    $ ruby -v
    ruby 1.9.1p376 (2009-12-07 revision 26041) [powerpc-darwin9]
    
    $ gem list rails
    
    *** LOCAL GEMS ***
    
    rails (3.0.0.beta, 2.3.5)
    
    $ rails _2.3.5_ blog235
    /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:827:in `report_activate_error': RubyGem version error: railties(3.0.0.beta not = 2.3.5) (Gem::LoadError)
        from /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:261:in `activate'
        from /opt/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:68:in `gem'
        from /opt/local/bin/rails:18:in `<main>'
    

    February 11th, 2010 @ 02:38 AM

  3. Robs
    Robs

    I'm having a similar issue. I'm not using rvm. Has anyone been able to get this working? If so, how?

    $ ruby -v
    ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
    $ gem list rails
    rails (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2, 1.2.6)
    $ rails 2.3.5 code
    /Library/Ruby/Site/1.8/rubygems.rb:777:in report_activate_error': RubyGem version error: railties(3.0.0.beta not = 2.3.5) (Gem::LoadError)
      from /Library/Ruby/Site/1.8/rubygems.rb:211:inactivate'
      from /Library/Ruby/Site/1.8/rubygems.rb:1056:in gem'
      from /usr/bin/rails:18</code>
    </pre>
    

    March 25th, 2010 @ 05:50 PM

  4. Robs
    Robs

    The italic "2.3.5" part actually had underscores around it, btw...

    March 25th, 2010 @ 05:51 PM

  5. José Valim
    José Valim
    • State changed from new to wontfix

    Unfortunately won't fix. It's more like a rubygems limitation.

    March 26th, 2010 @ 12:16 AM