# Gem version issue prevent server starting

**URL:** <https://www.ruby-forum.com/t/gem-version-issue-prevent-server-starting/156549>\
**Category:** Rails\
**Created:** [December 29, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/gem-version-issue-prevent-server-starting/156549 "2008-12-29T22:13:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codecarpenter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Post date:** [December 29, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/gem-version-issue-prevent-server-starting/156549/1 "2008-12-29T22:13:53Z")

</div>

Hi All,

I backed up my rails project and then reinstall Windows due to OS crash.  
Then I install the latest Ruby, RubyGem, and Rails and copy back the  
rails project. But now I cannot start the server (ruby script/server).  
It gives the following message:

./script/…/config/boot.rb:26:Warning: Gem:SourceIndex#search support  
for String patterns is deprecated Cannot find gem for Rails ~\>1.3.1.0:  
Install the missing gem with ‘gem install -v=1.3.1 rails’, or change  
environment.rb to define RAILS\_GEM\_VERSION with your desired location.

I changed environment.rb’s RAILS\_GEM\_VERSION to 1.3.1 but it does not  
have an effect. Then I tried to install the missing gem as listed above  
(I think it is already installed but I try it anyway) and got the error  
message: Could not find gem rails locally or in a depository.

How can I solve this problem? Should I start a new app for my existing  
project?  
Please enlighten. Thanks!

---

<div class="post-metadata">

**Author:** ![codecarpenter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Post date:** [December 30, 2008, 1:43am UTC](https://www.ruby-forum.com/t/gem-version-issue-prevent-server-starting/156549/2 "2008-12-30T01:43:12Z")

</div>

Andreas,

RAILS\_GEM\_VERSION should match the version number of your installed  
rails. i.e.: on my system,  
rails --version gives Rails 2.2.2  
thus, RAILS\_GEM\_VERSION = ‘2.2.2’ is correct.

1.3.1 is probably the version of gem you have installed

rick

On Dec 29, 11:13 am, kevin lee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![codecarpenter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Post date:** [December 30, 2008, 1:44am UTC](https://www.ruby-forum.com/t/gem-version-issue-prevent-server-starting/156549/3 "2008-12-30T01:44:22Z")

</div>

Sorry about the name change Kevin…
