# Install older version of rails FAILED

**URL:** <https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992>\
**Category:** Rails\
**Created:** [January 17, 2009, 1:51pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992 "2009-01-17T13:51:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [January 17, 2009, 1:51pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/1 "2009-01-17T13:51:50Z")

</div>

Help! I need your help!!!

I have an old rail app which I made a few years ago. Never touched rails  
since.

Now, I need to make it work again. I used the above command to install  
rails, but I still get rails 2.1.1

gem install rails --version 1.2.6

I tried twice, and fails twice, even the installation says

Successfully installed activesupport-1.4.4  
Successfully installed activerecord-1.15.6  
Successfully installed actionpack-1.13.6  
Successfully installed actionmailer-1.3.6  
Successfully installed actionwebservice-1.2.6  
Successfully installed rails-1.2.6  
6 gems installed  
Installing ri documentation for activesupport-1.4.4…  
Installing ri documentation for activerecord-1.15.6…  
Installing ri documentation for actionpack-1.13.6…  
Installing ri documentation for actionmailer-1.3.6…  
Installing ri documentation for actionwebservice-1.2.6…  
Installing RDoc documentation for activesupport-1.4.4…  
Installing RDoc documentation for activerecord-1.15.6…  
Installing RDoc documentation for actionpack-1.13.6…  
Installing RDoc documentation for actionmailer-1.3.6…  
Installing RDoc documentation for actionwebservice-1.2.6…

Any help would be really appreciated…

---

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [January 17, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/2 "2009-01-17T13:55:26Z")

</div>

Actually, I really need is rails 1.1.6, I check my config/environment.rb

This is what I got

C:\rubyapp\>gem install rails --version 1.1.6  
Successfully installed rails-1.1.6  
1 gem installed

C:\rubyapp\>rails -v  
Rails 2.1.1

---

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [January 17, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/3 "2009-01-17T14:10:25Z")

</div>

Now, the version seems correct, but I cannot start the webrick server.  
The error message is exact the same as before…

The application I did not change a single bit since 2006.

HELP!please!!

C:\rubyapp\>gem uninstall rails

Select gem to uninstall:

1. rails-1.1.6
2. rails-1.2.6
3. rails-2.1.1
4. All versions

> 4  
> Successfully uninstalled rails-1.1.6  
> Successfully uninstalled rails-1.2.6  
> Successfully uninstalled rails-2.1.1

C:\rubyapp\>gem install rails --version 1.1.6  
Successfully installed rails-1.1.6  
1 gem installed

C:\rubyapp\>rails -v  
Rails 1.1.6

C:\rubyapp\>cd iptv

C:\rubyapp\iptv\>ruby script/server  
./script/…/config/boot.rb:28: undefined method `require_gem' for main:Object (N oMethodError) from c:/tools/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: in`gem\_original\_require’  
from  
c:/tools/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:  
in `require’  
from script/server:2

C:\rubyapp\iptv\>

C:\rubyapp\>rails -v  
Rails 2.1.1

C:\rubyapp\>gem uninstall rails

Select gem to uninstall:

1. rails-1.1.6
2. rails-1.2.6
3. rails-2.1.1
4. All versions

> 4  
> Successfully uninstalled rails-1.1.6  
> Successfully uninstalled rails-1.2.6  
> Successfully uninstalled rails-2.1.1

C:\rubyapp\>gem install rails --version 1.1.6  
Successfully installed rails-1.1.6  
1 gem installed

C:\rubyapp\>rails -v  
Rails 1.1.6

C:\rubyapp\>cd iptv

C:\rubyapp\iptv\>ruby script/server  
./script/…/config/boot.rb:28: undefined method `require_gem' for main:Object (N oMethodError) from c:/tools/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: in`gem\_original\_require’  
from  
c:/tools/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:  
in `require’  
from script/server:2

C:\rubyapp\iptv\>

C:\rubyapp\>rails -v  
Rails 2.1.1

C:\rubyapp\>gem uninstall rails

Select gem to uninstall:

1. rails-1.1.6
2. rails-1.2.6
3. rails-2.1.1
4. All versions

> 4  
> Successfully uninstalled rails-1.1.6  
> Successfully uninstalled rails-1.2.6  
> Successfully uninstalled rails-2.1.1

C:\rubyapp\>gem install rails --version 1.1.6  
Successfully installed rails-1.1.6  
1 gem installed

C:\rubyapp\>rails -v  
Rails 1.1.6

C:\rubyapp\>cd iptv

C:\rubyapp\iptv\>ruby script/server  
./script/…/config/boot.rb:28: undefined method `require_gem' for main:Object (N oMethodError) from c:/tools/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: in`gem\_original\_require’  
from  
c:/tools/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:  
in `require’  
from script/server:2

---

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [January 17, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/4 "2009-01-17T14:30:26Z")

</div>

On 17 Jan 2009, at 13:10, Roseanne Z. wrote:

> Now, the version seems correct, but I cannot start the webrick server.  
> The error message is exact the same as before…
> 
> The application I did not change a single bit since 2006.

The problem you’ve got here is probably that the version of rubygems  
you’ve got is too new for the version of rails you’ve got.  
Replacing calls to require\_gem with calls to gem should do the trick.  
Fred

---

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [June 29, 2011, 5:45pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/5 "2011-06-29T17:45:07Z")

</div>

I think you have to quote the version number.

e.g. gem install rails --version ‘1.2.6’

---

<div class="post-metadata">

**Author:** ![roseanne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@roseanne](https://www.ruby-forum.com/u/roseanne)\
**Post date:** [January 17, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/install-older-version-of-rails-failed/157992/6 "2009-01-17T14:45:52Z")

</div>

Huge thanks, Frederick!!!

WOW, you are exactly right, now, the server started, and the app runs.

BIG release sigh…

Of course, I need to make the database work again…

Maybe, I need to change to the old version of gem?

Roseanne

Frederick C. wrote:

> On 17 Jan 2009, at 13:10, Roseanne Z. wrote:
> 
> > Now, the version seems correct, but I cannot start the webrick server.  
> > The error message is exact the same as before…
> > 
> > The application I did not change a single bit since 2006.
> 
> The problem you’ve got here is probably that the version of rubygems  
> you’ve got is too new for the version of rails you’ve got.  
> Replacing calls to require\_gem with calls to gem should do the trick.  
> Fred
