# Rails requires RubyGems \>= 1.1.1 : problem

**URL:** <https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139>\
**Category:** rubyonrails-talk\
**Created:** [November 7, 2008, 9:43am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139 "2008-11-07T09:43:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Balthazar](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@Thomas\_Balthazar](https://discuss.rubyonrails.org/u/Thomas_Balthazar)\
**Post date:** [November 7, 2008, 9:43am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/1 "2008-11-07T09:43:23Z")

</div>

Hello,

On my local machine (Mac OS X 10.5.5), I get the following error when I try to run script/server start :

“Rails requires RubyGems \>= 1.1.1 (you have 1.0.1). Please `gem update --system` and try again.”

The Rails app was a former 1.2.6 upgraded to 2.1, and it worked fine.

I’ve run the rake rails:update command.

If I create a new Rails app, it starts with the command script/server start without complaining.

I’ve run :

sudo gem update --system

Updating RubyGems

Nothing to update

Some infos :

- gem -v

1.3.1

- which gem

/usr/local/bin/gem

- ruby -v

ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.5.1]

- which ruby

/usr/local/bin/ruby

- rails -v

Rails 2.1.2

- which rails

/usr/local/bin/rails

- gem list

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.1.2, 2.1.0, 1.3.6)

actionpack (2.1.2, 2.1.0, 1.13.6)

actionwebservice (1.2.6)

activerecord (2.1.2, 2.1.0, 1.15.6)

activeresource (2.1.2, 2.1.0)

activesupport (2.1.2, 2.1.0, 1.4.4)

capistrano (2.5.0)

cgi\_multipart\_eof\_fix (2.5.0)

daemons (1.0.10)

fastthread (1.0.1)

gem\_plugin (0.2.3)

highline (1.4.0)

mongrel (1.1.5)

mysql (2.7)

net-scp (1.0.1)

net-sftp (2.0.1)

net-ssh (2.0.4)

net-ssh-gateway (1.0.0)

rails (2.1.2, 2.1.0, 1.2.6)

rake (0.8.3)

rubygems-update (1.3.1)

Any idea?

Thanks in advance for your help.

Best,

Thomas.

---

<div class="post-metadata">

**Author:** ![Rick3](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@Rick3](https://discuss.rubyonrails.org/u/Rick3)\
**Post date:** [November 8, 2008, 9:09pm UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/2 "2008-11-08T21:09:26Z")

</div>

Check the file config/environment.rb in your application's directory tree. It will have a line like:

RAILS\_GEM\_VERSION = '2.2.0' unless defined? RAILS\_GEM\_VERSION

Change the RAILS\_GEM\_VERSION to match yours, 2.1.2, and restart your script/server.

Rick

---

<div class="post-metadata">

**Author:** ![Freddy\_Andersen](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@Freddy\_Andersen](https://discuss.rubyonrails.org/u/Freddy_Andersen)\
**Post date:** [November 8, 2008, 10:18pm UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/3 "2008-11-08T22:18:35Z")

</div>

Just a wild guess but you have installed the ports version of ruby 1.8.7 which is not the default ruby install on osx. Gems are installed and stored under the ruby install that it was installed with.. Which means if you installed all the gems in one ruby then added the ports ruby you need to reinstall your gems...

You script/server might be getting some old path info... ?? I know when I upgraded to 1.8.7 on the mac I had very similar issues...

---

<div class="post-metadata">

**Author:** ![Thomas\_Balthazar](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@Thomas\_Balthazar](https://discuss.rubyonrails.org/u/Thomas_Balthazar)\
**Post date:** [November 9, 2008, 11:30am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/4 "2008-11-09T11:30:56Z")

</div>

Hello Rick,

Thanks for your help.

I already have this line in my environment.conf “RAILS\_GEM\_VERSION = ‘2.1.2’ unless defined? RAILS\_GEM\_VERSION”.

But I still get the same “Rails requires RubyGems \>= 1.1.1 (you have 1.0.1). Please `gem update --system` and try again.” error.

Thomas.

---

<div class="post-metadata">

**Author:** ![Thomas\_Balthazar](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@Thomas\_Balthazar](https://discuss.rubyonrails.org/u/Thomas_Balthazar)\
**Post date:** [November 9, 2008, 11:32am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/5 "2008-11-09T11:32:15Z")

</div>

Hello Freddy,

Thanks for your guess, but I compiled ruby manually, following Dan Benjamin’s instructions found here :

[http://danbenjamin.com/articles/2008/02/ruby-rails-leopard](http://danbenjamin.com/articles/2008/02/ruby-rails-leopard)

Thomas.

---

<div class="post-metadata">

**Author:** ![Rick3](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@Rick3](https://discuss.rubyonrails.org/u/Rick3)\
**Post date:** [November 9, 2008, 5:06pm UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/6 "2008-11-09T17:06:15Z")

</div>

ok,

So the "Rails requires..." message is comming from ".../gems/1.8/gems/ rails-2.1.2/environments/boot.rb" which will also force a load from "vendor/rails" if you have one.

Did you freeze rails into your app by any chance?

Rick

---

<div class="post-metadata">

**Author:** ![Thomas\_Balthazar](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@Thomas\_Balthazar](https://discuss.rubyonrails.org/u/Thomas_Balthazar)\
**Post date:** [November 10, 2008, 8:40am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/7 "2008-11-10T08:40:24Z")

</div>

Hello Rick,

My app wasn’t frozen.

I froze it to 2.1.2 and script/server start now works.

Thanks for your help.

Still, I don’t understand why it didn’t worked without the freeze.

Best,

Thomas.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [November 11, 2008, 12:41am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/8 "2008-11-11T00:41:11Z")

</div>

Excuse me. I'm caught in a similar problem. thank you for the hints so far.

But symptom at my hands has a great difference to Balthazar-san's one; "gem -v" returns 1.1.0, and it sticks whatever I've done(have downloaded rubygems-1.3.1 and let steup.rb run).

> I froze it to 2.1.2 and script/server start now works.

So I don't get success in freezing: the same error message comes up! when try freezing.

Won't you please give some further hints? I guess "gem -v" should be to return 1.3.1 somehow...

---

<div class="post-metadata">

**Author:** ![Thomas\_Balthazar](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@Thomas\_Balthazar](https://discuss.rubyonrails.org/u/Thomas_Balthazar)\
**Post date:** [November 12, 2008, 9:31am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/9 "2008-11-12T09:31:11Z")

</div>

Hello,

Did you try to run ‘gem update --system’?

Which OS are you running?

Best,

Thomas.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [November 13, 2008, 11:45am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/10 "2008-11-13T11:45:03Z")

</div>

HI

> Did you try to run 'gem update --system'?

Of Course I did. and got "nothing to update".

> Which OS are you running?

Mac OS X 10.5.5 as yours (^\_^;) I wonder ones with other platforms haven't come across the problem...

Best.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [November 16, 2008, 1:47am UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/11 "2008-11-16T01:47:54Z")

</div>

> I guess "gem -v" should be to return 1.3.1 somehow...

At last I found [http://docs.rubygems.org/read/chapter/15#page101](http://docs.rubygems.org/read/chapter/15#page101) tells "GEM\_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8 version of ruby." and that kind of settings now makes all OK. "gem -v" now returns 1.3.1 and script/server starts WEBrick.

I used to use /usr/local/rubygems/ of gem install dir, according to the default setting of gem (of former version). I damn that setting! I also find the default is now /usr/local/lib/ruby/gems/1.8 under gem of v1.3.1.

moto@Yonago, Japan

---

<div class="post-metadata">

**Author:** ![alberto2](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@alberto2](https://discuss.rubyonrails.org/u/alberto2)\
**Post date:** [December 30, 2008, 2:00pm UTC](https://discuss.rubyonrails.org/t/rails-requires-rubygems-1-1-1-problem/36139/12 "2008-12-30T14:00:03Z")

</div>

$ gem install rubygems-update $ update\_rubygems
