Forum: Ruby on Rails Install older version of rails FAILED

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F5bb435184cc39b6ef4847ed29cfdc46?d=identicon&s=25 Roseanne Zhang (roseanne)
on 2009-01-17 13:51
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

[b]gem install rails --version 1.2.6[/b]

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...
F5bb435184cc39b6ef4847ed29cfdc46?d=identicon&s=25 Roseanne Zhang (roseanne)
on 2009-01-17 13:55
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
F5bb435184cc39b6ef4847ed29cfdc46?d=identicon&s=25 Roseanne Zhang (roseanne)
on 2009-01-17 14:10
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
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-01-17 14:30
(Received via mailing list)
On 17 Jan 2009, at 13:10, Roseanne Zhang 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
F5bb435184cc39b6ef4847ed29cfdc46?d=identicon&s=25 Roseanne Zhang (roseanne)
on 2009-01-17 14:45
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 Cheung wrote:
> On 17 Jan 2009, at 13:10, Roseanne Zhang 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
Bcdd7f3b518d8749cc4e8e1383d6bb9d?d=identicon&s=25 Alex K. (alex_k)
on 2011-06-29 17:45
I think you have to quote the version number.

e.g. gem install rails --version '1.2.6'
This topic is locked and can not be replied to.