# Upgrade 1.0 =\> 1.1.2 Broke My App (environment.rb ?)

**URL:** <https://www.ruby-forum.com/t/upgrade-1-0-1-1-2-broke-my-app-environment-rb/58794>\
**Category:** Rails\
**Created:** [April 25, 2006, 11:52pm UTC](https://www.ruby-forum.com/t/upgrade-1-0-1-1-2-broke-my-app-environment-rb/58794 "2006-04-25T23:52:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wksmall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@wksmall](https://www.ruby-forum.com/u/wksmall)\
**Post date:** [April 25, 2006, 11:52pm UTC](https://www.ruby-forum.com/t/upgrade-1-0-1-1-2-broke-my-app-environment-rb/58794/1 "2006-04-25T23:52:31Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![wksmall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@wksmall](https://www.ruby-forum.com/u/wksmall)\
**Post date:** [April 26, 2006, 12:17am UTC](https://www.ruby-forum.com/t/upgrade-1-0-1-1-2-broke-my-app-environment-rb/58794/2 "2006-04-26T00:17:39Z")

</div>

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 S.:

---

<div class="post-metadata">

**Author:** ![wksmall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@wksmall](https://www.ruby-forum.com/u/wksmall)\
**Post date:** [April 26, 2006, 12:20am UTC](https://www.ruby-forum.com/t/upgrade-1-0-1-1-2-broke-my-app-environment-rb/58794/3 "2006-04-26T00:20:54Z")

</div>

Mostly fixed. When I did ‘rails .’ it confusingly created a new  
index.html that was just  
one bug too many…

Warren S.
