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.

rails 3 creating new app (skel) is not compatibile with rails 2

#4999

To create new app in rails 2:

rails _2.3.8_ /home/user/myapp
To create new app in rails 3:
rails new /home/user/myapp

so, when you install rails 3 gem you cant actualy create app skel for rails 2 no more!
Also "rails new" don't allow specifing version like in _2.3.8_

Reported by naox · June 28th, 2010 @ 09:45 PM

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

Activity

  1. Anil Wadghule
    Anil Wadghule

    When you have Rails 3 gem installed. It's true that you cannot create Rails 2 app with it. If you are using RVM, you can try RVM gemsets.

    Other solution is that if you have Rails source git repo downloaded, switch to 2-3-stable branch and run 'ruby ~/Code/rails_repo/railties/bin/rails yourappname', this will create Rails 2 app even if you have Rails 3 gems installed.

    June 29th, 2010 @ 04:04 AM

  2. naox
    naox

    ok, still You should consider it a bug. Rails2 gems are still in gem directory. No reason why those should not work on whole system. New "rails" command from rails3 breaks previous rails command. It should have other name, be compatibile backwards or at least fully replace old command with a new syntax - like switches to specify version 2 skel.

    June 29th, 2010 @ 01:44 PM

  3. naox
    naox

    also new "rails new" syntax should at least allow specifing old versions inside 3.x branch like "rails _2.3.3_ dir"

    June 29th, 2010 @ 01:47 PM

  4. Wincent Colaiuta
    Wincent Colaiuta

    Seems like an invalid ticket to me. I have multiple versions of Rails installed here, and all of the following work as expected:

    # create 2.3.5 app
    rails _2.3.5_ foobar
    
    # create 3.0.0.beta4 app
    rails _3.0.0.beta4_ new heythere
    
    # create app using latest version of Rails system
    rails new hello
    

    June 29th, 2010 @ 04:01 PM

  5. chaitanyav
    chaitanyav

    @naox, going forward you would have to upgrade to Rails 3 with some not backward compatible changes. In that case it does not make sense for rails3 to generate Rails 2 app.

    June 29th, 2010 @ 05:45 PM

  6. naox
    naox

    ticket invalid.

    rails _2.3.5 foobar
    works ok with a new "rails" command and with same command
    rails
    3.0.0.beta4_ new foobar

    create skel for >3 you need "new" in command syntax. It does not break ceating old skel as I first observed.

    June 29th, 2010 @ 06:09 PM

  7. José Valim
    José Valim
    • State changed from new to invalid
    • Importance changed from to Low

    June 30th, 2010 @ 04:02 PM