# After updating to Rails 2.3.2 whole enviroment broke. Help!

**URL:** <https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178>\
**Category:** Rails\
**Created:** [April 9, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178 "2009-04-09T21:53:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![slafochmed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Post date:** [April 9, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178/1 "2009-04-09T21:53:29Z")

</div>

Hi,

I don’t know what to do. I upgraded to Rails 2.3.2 (from 2.2.2) and  
everything worked fine. Then I installed the gem gettext\_rails following  
this manual:

[http://www.yotabanana.com/hiki/ruby-gettext-rails-migration.html](http://www.yotabanana.com/hiki/ruby-gettext-rails-migration.html)

At some point I realised that I cannot start my Application anymore nor  
run any rake tasks. I don’t know exactly what happened. I just have the  
idea that I messed up my gems at some point in the past when I changed  
the directory, trying to run two Rails versions parallel. So I cleaned  
up my gems using

$ sudo gem cleanup

But still, when I run a rake task I get the following error:

$ rake -T  
(in /Users/xxx/Sites/zzz)  
rake aborted!  
no such file to load – active\_support  
/Users/Olaf/Sites/customcuddle/Rakefile:9

When I try to start the server

$ script/server --trace  
/Library/Ruby/Site/1.8/rubygems/custom\_require.rb:36:in  
`gem_original_require': no such file to load -- active_support (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require’  
from  
/Users/Olaf/Sites/customcuddle/vendor/rails/railties/lib/commands/server.rb:1  
from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’  
from script/server:3

I don’t understand this. I’m running the newest version of rails and  
everything should be fine.

$ gem list

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

actionmailer (2.3.2)  
actionpack (2.3.2)  
activerecord (2.3.2)  
activeresource (2.3.2)  
activesupport (2.3.2)  
acts\_as\_ferret (0.4.3)  
capistrano (2.5.5)  
cgi\_multipart\_eof\_fix (2.5.0)  
clickatell (0.5.0)  
columnize (0.3.0)  
daemons (1.0.10)  
dnssd (0.7.1)  
fastthread (1.0.7)  
fcgi (0.8.7)  
ferret (0.11.6)  
gem\_plugin (0.2.3)  
gettext (2.0.0)  
gettext\_activerecord (2.0.0)  
gettext\_rails (2.0.0)  
haml (2.0.9)  
highline (1.5.0)  
hoe (1.12.1)  
hpricot (0.8.1)  
image\_science (1.1.3)  
libxml-ruby (1.1.3)  
linecache (0.43)  
locale (2.0.0)  
locale\_rails (2.0.0)  
mini\_magick (1.2.3)  
mocha (0.9.5)  
mongrel (1.1.5)  
mysql (2.7)  
needle (1.3.0)  
net-scp (1.0.2)  
net-sftp (2.0.2)  
net-ssh (2.0.11)  
net-ssh-gateway (1.0.1)  
openrain-action\_mailer\_tls (1.1.3)  
rack (0.9.1)  
rails (2.3.2)  
rake (0.8.4)  
RedCloth (4.1.9)  
redgreen (1.2.2)  
rmagick (2.9.1)  
rspec (1.2.2)  
rspec-rails (1.2.2)  
ruby-debug (0.10.3)  
ruby-debug-base (0.10.3)  
ruby-debug-ide (0.4.5)  
ruby-openid (2.1.4)  
ruby-yadis (0.3.4)  
rubyforge (1.0.3)  
rubygems-update (1.3.1)  
RubyInline (3.8.1)  
rubyist-aasm (2.0.5)  
rubynode (0.1.5)  
sources (0.0.1)  
sqlite3-ruby (1.2.4)  
syntax (1.0.0)  
termios (0.9.4)  
ZenTest (4.0.0)

Please help!!! Thank you very much!  
Olaf

---

<div class="post-metadata">

**Author:** ![slafochmed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Post date:** [April 10, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178/2 "2009-04-10T22:05:24Z")

</div>

I am assuming that you don’t have a statement like;

RAILS\_GEM\_VERSION = ‘2.2.2’ unless defined? RAILS\_GEM\_VERSION

Since you were doing fine until you installed the gem in question. If  
you have not updated it for Rails 2.3.2 then do so and try again.

If that does not work then my advice would be to:

a) back up everything, and

b) downgrade again to 2.2.2 by installing Rails 2.2.2 gems and  
activating that version by uncommenting the statement

RAILS\_GEM\_VERSION = ‘2.2.2’ unless defined? RAILS\_GEM\_VERSION

And then try again. Until you get to the troublesome gem. Then if  
you can install it as a plugin so that you can debug it in your  
application environment instead of the global environment.

It is a step-by-step process and you have to test every step of the  
way.

---

<div class="post-metadata">

**Author:** ![slafochmed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Post date:** [April 11, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178/3 "2009-04-11T20:14:02Z")

</div>

There’s still something weird going on - you shouldn’t have to run the  
freeze task as root…

What exactly is “incomplete” when you run it as a regular user?

–Matt J.

On Apr 10, 4:34 pm, “Olaf S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![slafochmed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Post date:** [April 13, 2009, 8:04pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178/4 "2009-04-13T20:04:58Z")

</div>

It only copied the folder vendor/rails/railties and says that my Gem  
folder isn’t writeable, so all the other folders are missing. But when I  
try to reproduce this behavior everything seems to work, even though I  
still get some error messages:

Do you have any idea what that could mean?

My Gem Folder is on a Mac OS Leopard:

GEM\_HOME=/Library/Ruby/Gems/1.8

But I had 2 folders once because - as I said - I wanted to run to  
different Systems on one machine (pretty stupid…).

The Terminal Output of rake rails:freeze:gems without sudo:

$ rake rails:freeze:gems  
(in /Users/Olaf/Sites/myapp)  
Freezing to the gems for Rails 2.3.2  
rm -rf vendor/rails  
mkdir -p vendor/rails  
cd vendor/rails  
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and  
/usr/bin aren’t both writable.  
Unpacked gem: ‘/Users/Olaf/Sites/myapp/vendor/rails/activesupport-2.3.2’  
mv activesupport-2.3.2 activesupport  
Unpacked gem: ‘/Users/Olaf/Sites/myapp/vendor/rails/activerecord-2.3.2’  
mv activerecord-2.3.2 activerecord  
Unpacked gem: ‘/Users/Olaf/Sites/myapp/vendor/rails/actionpack-2.3.2’  
mv actionpack-2.3.2 actionpack  
Unpacked gem: ‘/Users/Olaf/Sites/myapp/vendor/rails/actionmailer-2.3.2’  
mv actionmailer-2.3.2 actionmailer  
Unpacked gem:  
‘/Users/Olaf/Sites/myapp/vendor/rails/activeresource-2.3.2’  
mv activeresource-2.3.2 activeresource  
Unpacked gem: ‘/Users/Olaf/Sites/myapp/vendor/rails/rails-2.3.2’  
cd -

Very strange…

---

<div class="post-metadata">

**Author:** ![slafochmed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Post date:** [April 10, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/after-updating-to-rails-2-3-2-whole-enviroment-broke-help/165178/5 "2009-04-10T22:34:00Z")

</div>

Thank you very much for your help. It was a very stupid mistake and is  
solved now:

After upgrading to rails I removed the /vendor/rails folder, because I  
freezed rails. Then I’ve run

$ rake rails:freeze:gems

to freeze the new version (2.3.2).

I forgot that I had to do this as root, so the freezed rails version was  
incomplete. I didn’t notice that… This caused the include problem.

To solve this problem I just had to run in my Application folder:

$ sudo rm -r vendor/rails

$ sudo rake rails:freeze:gems

Make sure to also run the remove command as root, just trashing the  
folder in TextMate will not work.

Thanks anyway!

Bharat R. wrote:

> I am assuming that you don’t have a statement like;
> 
> RAILS\_GEM\_VERSION = ‘2.2.2’ unless defined? RAILS\_GEM\_VERSION
> 
> Since you were doing fine until you installed the gem in question. If  
> you have not updated it for Rails 2.3.2 then do so and try again.
> 
> If that does not work then my advice would be to:
> 
> a) back up everything, and
> 
> b) downgrade again to 2.2.2 by installing Rails 2.2.2 gems and  
> activating that version by uncommenting the statement
> 
> RAILS\_GEM\_VERSION = ‘2.2.2’ unless defined? RAILS\_GEM\_VERSION
> 
> And then try again. Until you get to the troublesome gem. Then if  
> you can install it as a plugin so that you can debug it in your  
> application environment instead of the global environment.
> 
> It is a step-by-step process and you have to test every step of the  
> way.
