Warren Seltzer
2006-Apr-25 21:53 UTC
[Rails] Upgrade 1.0 => 1.1.2 Broke My App (environment.rb ?)
Short version: Do I need to re-run script/generate after doing ''rails .'' ?? My rails app worked fine under ruby 1.8.2 and rails 0.13. I then upgraded to rails 1.0 and it still worked fine. Don''t ask me exactly what I did when I upgraded rails then, I don''t remember, exactly. Yesterday committed the rails app to svn then I upgraded to ruby 1.8.4 and tested and the rails app worked fine under ruby 1.8.4 and rails 1.0. Today I upgraded rails by typing ''gem install rails --include-dependencies''. I guess that was the wrong thing to do. It doesn''t work anymore. I don''t even have a config/boot.rb and the config/environments.rb is the same 86 line file as it was originally in November. So I''ve begun to see I have some work to do but not yet figured out what. Oh, and my rails/thing/rakefile is the same 206 line thing it was back in November, too. If you tell me how to fix it I promise to be good in the future. I think I must have upgraded to 1.0 by just doing the ''gem install ....'' thing and have been happily banging away ever since. I am not so happy now. The dev log says: Your environment.rb uses the old syntax, it may not continue to work in future releases. For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19 LineItem Columns (0.361000) SHOW FIELDS FROM line_items You have a nil object when you didn''t expect it! The error occured while evaluating nil.primary_key_name c:/program files/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations/belon gs_to_association.rb:52:in `foreign_key_ present''..... I figured out to run ''rails .'' and then do a full compare, adjusting any differences as needed. That was easier than I feared. I confess I''ve never run ''rake test'' and don''t know what it did before but it sure complains now. So now there is NO BUG and the message about environment.rb no longer appears -- but my app doesn''t come up. Instead I get the generic rails "Welcome aboard" page. How do I find my app? Do I need to re-run script/generate ?? Warren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/d4711240/attachment-0001.html
Thomas Fuchs
2006-Apr-25 22:14 UTC
[Rails] Upgrade 1.0 => 1.1.2 Broke My App (environment.rb ?)
Heya, Short answer: No. Just delete the public/index.html file. "rails ." will generate this file as a starting point by default. Your app should be back up and running after deleting the file (of course there could be stuff in your app that break in Rails 1.1.2, like certain plug-ins and libs). -Thomas Am 25.04.2006 um 23:49 schrieb Warren Seltzer:> I figured out to run ''rails .'' and then do a full compare, > adjusting any differences as needed. That was easier than I > feared. I confess I''ve never run ''rake test'' and don''t know what > it did before but it sure complains now. > > So now there is NO BUG and the message about environment.rb no > longer appears -- but my app doesn''t come up. Instead I get the > generic rails "Welcome aboard" page. How do I find my app? > > Do I need to re-run script/generate ?? > > Warren > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Warren Seltzer
2006-Apr-25 22:21 UTC
[Rails] Upgrade 1.0 => 1.1.2 Broke My App (environment.rb ?)
Mostly fixed. When I did ''rails .'' it confusingly created a new index.html that was just one bug too many... Warren Seltzer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/abffc921/attachment.html