How to make a 126 rails project when 2.02 is installed with windows

How do I make a 126 rails project when 2.02 is installed?

I posted this question and got this answer:

You can generate a NEW rails 1.2.6 project like this
$rails 1.2.6 myproject

That will probably work on a linix machine, but I couldn’t get it go
on XP, at least not for 1.2.3

I finally got it to work. I needed a rails 1.2.3 app so I did this:

gem install rails -v=1.2.3
which on my machine, installed in rails 1.2.3 in
C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3

cd to C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3
then
rails C:\rails_projects_dir\my_app_name

Which created the rails app my_app_name in the directory named C:
\rails_projects_dir

Good luck

No, that did’nt work.
I got a 2.02 project

crap

OK, I got it

just CD to the dir in which you want the project, like normal and run:

ruby C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3\bin\rails my_project

Then
rake rails:freeze:edge TAG=rel_1-2-3

viola

If I run Rails -v I get 2.0.2 but when I run ruby script/server the
page says 123

fun stuff

Actually it’s way simpler than that.

Make sure you have the latest rubygems and that you have rails 1.2.6
gems
installed
gem update --system
gem install rails -v=1.2.6

Then create a new project with Rails 1.2.6

rails 1.2.6 my_project

Then freeze if desired.

The x.y.z parameter tells Rubygems which version should be used.

Thanks but…

Not trying to be a jerk however I tried that about 40 times over two
hours with every variation imaginable.
rails_1.2.3_ my_project
rails_1-2-3_ my_project
rails_123_ my_project
rails_1.2.3 my_project
rails TAG=rel_1-2-3 my_project (made a project named “TAG=rel_1-2-3”)

If you can think of it, I tried it

The point of my post was that what you describe doesn’t work. At least
not for me, on Windows XP with version 1.2.3

On Apr 17, 9:26 pm, “Brian H.” [email protected] wrote:

ruby C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3\bin\rails my_project

I posted this question and got this answer:
which on my machine, installed in rails 1.2.3 in
C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3

cd to C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3
then
rails C:\rails_projects_dir\my_app_name

Which created the rails app my_app_name in the directory named C:
\rails_projects_dir

@Rails Freak: I tried it with six versions of the framework installed
(2.0.2, 2.0.1, 1.2.6, 1.2.5, 1.2.4, 1.2.2), Ruby 1.8.6, Windows XP.
It worked the first time and every time.

railsversionapp_name

rails 1.2.2 test

test/config/environment.rb

Be sure to restart your web server when you modify this file.

Uncomment below to force Rails into production mode when

you don’t control web/app server and can’t set it the proper way

ENV[‘RAILS_ENV’] ||= ‘production’

Specifies gem version of Rails to use when vendor/rails is not

present
RAILS_GEM_VERSION = ‘1.2.2’ unless defined? RAILS_GEM_VERSION

(Note the GEM_VERSION ^^^ )

AndyV
Sure as hell, It worked as you say
I was missing the space between rails and 1.2.3.

My face is red now

Just in case this helps, here’s the contents of your c:\ruby\bin
\rails:


#!C:/ruby/bin/ruby

This file was generated by RubyGems.

The application ‘rails’ is installed as part of a gem, and

this file is here to facilitate running it.

require ‘rubygems’
version = “> 0”
if ARGV.first =~ /^(.*)$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem ‘rails’, version
load ‘rails’

Check out the line below: version = “> 0”
They’re parsing the first argument and looking for a string beginning
and ending with underscores. If it exists then it’s checked to see if
it’s a valid Gem version. If that’s true (ie., you have that version
of the gem installed) then a rails app of that version is created.