# Rails command version pegging?

**URL:** <https://www.ruby-forum.com/t/rails-command-version-pegging/84228>\
**Category:** Rails\
**Created:** [February 2, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/rails-command-version-pegging/84228 "2007-02-02T16:30:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [February 2, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/rails-command-version-pegging/84228/1 "2007-02-02T16:30:47Z")

</div>

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 K.

---

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [February 3, 2007, 7:19am UTC](https://www.ruby-forum.com/t/rails-command-version-pegging/84228/2 "2007-02-03T07:19:03Z")

</div>

On 2/3/07, Andy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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?

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.

---

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [February 3, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/rails-command-version-pegging/84228/3 "2007-02-03T21:49:15Z")

</div>

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.

–  
À la renverse.

---

<div class="post-metadata">

**Author:** ![ddancer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Post date:** [February 4, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/rails-command-version-pegging/84228/4 "2007-02-04T16:27:45Z")

</div>

On 2/3/07, George O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

On 2/4/07, Jean-François [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> $ rails _1.1.6_ my\_app

I stand corrected. Thanks! 🙂
