rails command version pegging?

Hello,

Is it possible to declare the version of Rails used with the seminal "rails /path/to/my_app" command?

For example, I now have 1.2.1 and 1.1.6 installed on my machine. If I run "rails my_app" I get 1.2.1 produced skeleton code. Is there a way to get 1.1.6 results?

Regards,

Andy Koch

I don't know if there's a better way, but one that seems to work is to
use the script in the gem itself rather than the one that rubygems
creates.

ruby `ruby -rubygems -e "puts Gem.path.last+'/gems/rails-1.1.6/bin/rails'"` NAME

It looks to me like gems doesn't support multiple versions of
executables, only libraries.

Hi Andy,

Is it possible to declare the version of Rails used with the seminal
"rails /path/to/my_app" command?

yes.

For example, I now have 1.2.1 and 1.1.6 installed on my
machine. If I run "rails my_app" I get 1.2.1 produced skeleton
code. Is there a way to get 1.1.6 results?

$ rails _1.1.6_ my_app

HTH,

   -- Jean-François.

I stand corrected. Thanks! :slight_smile: