# Script/console using older Rails version

**URL:** <https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441>\
**Category:** Rails\
**Created:** [February 26, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441 "2009-02-26T14:23:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [February 26, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/1 "2009-02-26T14:23:08Z")

</div>

Hi all,

I have an app running fine on Rails 2.2.2, but whenever I launch the  
script/console in the same app it loads Rails version 2.1.0. I wouldn’t  
really mind, except that every time I start the console I get a lot of  
annoying warnings about duplicate constant declarations in xmlsimple.

Does anyone know how I can get the console to run on Rails 2.2.2?

Thanks,  
Dante

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [February 26, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/2 "2009-02-26T16:40:15Z")

</div>

On Thu, Feb 26, 2009 at 3:23 PM, Dantelepoole Dantelepoole  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## Thanks, Dante
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

Do you have the rails version defined in your environment.rb file?

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [February 26, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/3 "2009-02-26T16:50:55Z")

</div>

Yes, I do. Its set to version 2.2.2. Another strange thing that I just  
noticed is that when I run ‘gem list’ it turns out that I don’t even  
have Rails version 2.1.0 installed! I have versions 2.2.2, 2.1.1 and  
2.0.2 installed, but no 2.1.0.

I thought it might be a bug, but I have the same app running on a new  
laptop and the console-script on that laptop correctly loads Rails 2.2.2  
and does not give the warning-messages either.

Strange…

Andrew T. wrote:

> > 
> 
> Do you have the rails version defined in your environment.rb file?
> 
> Andrew T.  
> [http://ramblingsonrails.com](http://ramblingsonrails.com)  
> [http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)
> 
> “I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [March 1, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/4 "2009-03-01T15:17:49Z")

</div>

I just tried, but no luck unfortunately. ☹  
Thanks anyway for the help!

Andrew T. wrote:

> On Thu, Feb 26, 2009 at 5:50 PM, Dantelepoole Dantelepoole  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Strange…
> > 
> > > “I have never let my schooling interfere with my education” - Mark Twain
> > 
> > –  
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> > 
> > >
> 
> Interesting, have you run rake rails:update ?  
> After that, I’m out of ideas
> 
> Andrew T.  
> [http://ramblingsonrails.com](http://ramblingsonrails.com)  
> [http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)
> 
> “I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [February 26, 2009, 4:57pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/5 "2009-02-26T16:57:57Z")

</div>

On Thu, Feb 26, 2009 at 5:50 PM, Dantelepoole Dantelepoole  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Strange…
> 
> > “I have never let my schooling interfere with my education” - Mark Twain
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

Interesting, have you run rake rails:update ?  
After that, I’m out of ideas

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [March 1, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/6 "2009-03-01T15:40:35Z")

</div>

Maybe at some point you put Rails 2.1.0 into vendor/rails. Anything in  
vendor/rails will override what you set in environment.rb and what gems  
you  
have installed. You could delete the vendor/rails directory if you don’t  
want it, or you could try freezing your app to Rails 2.2.2 and rerunning  
rake rails:update.

Regards,  
Craig

–  
Craig D.  
Mutually Human Software

> **[Homepage | Mutually Human](https://www.mutuallyhuman.com/)**
>
> Technology Made for Humans by humans Data Analytics Data Analytics Data has become a critical part of business for most organizations. We work with you to ensure you have confidence in your data, can properly access it, and present it in a way that...

---

<div class="post-metadata">

**Author:** ![dantelepoole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dantelepoole](https://www.ruby-forum.com/u/dantelepoole)\
**Post date:** [March 1, 2009, 6:48pm UTC](https://www.ruby-forum.com/t/script-console-using-older-rails-version/161441/7 "2009-03-01T18:48:36Z")

</div>

This did the trick…thanks!!

Craig D. wrote:

> Maybe at some point you put Rails 2.1.0 into vendor/rails. Anything in  
> vendor/rails will override what you set in environment.rb and what gems  
> you  
> have installed. You could delete the vendor/rails directory if you don’t  
> want it, or you could try freezing your app to Rails 2.2.2 and rerunning  
> rake rails:update.
> 
> Regards,  
> Craig
> 
> –  
> Craig D.  
> Mutually Human Software  
> [http://mutuallyhuman.com](http://mutuallyhuman.com)
