Forum: Ruby on Rails After updating to Rails 2.3.2 whole enviroment broke. Help!!

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.
Olaf S. (Guest)
on 2009-04-09 23:53
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-...

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
Bharat R. (Guest)
on 2009-04-11 00:05
(Received via mailing list)
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.
Olaf S. (Guest)
on 2009-04-11 00:34
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.
Matt J. (Guest)
on 2009-04-11 22:14
(Received via mailing list)
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>
Olaf S. (Guest)
on 2009-04-13 22:04
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...
This topic is locked and can not be replied to.