# Upgrading my App to Rails 2.0 : a few problems and questions

**URL:** <https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563>\
**Category:** Rails\
**Created:** [October 7, 2007, 12:41pm UTC](https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563 "2007-10-07T12:41:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbaustert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Post date:** [October 7, 2007, 12:41pm UTC](https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563/1 "2007-10-07T12:41:32Z")

</div>

Hello,  
I’ve started to build my app on RoR 1.2.3.  
I want to start porting it to RoR 2.0.

I’ve tried to “Install the preview release through  
gems[http://weblog.rubyonrails.org/2007/9/30/rails-2-0-0-preview-release](http://weblog.rubyonrails.org/2007/9/30/rails-2-0-0-preview-release)”  
like this :

gem install rails --source [http://gems.rubyonrails.org](http://gems.rubyonrails.org)

All I get is “Successfully installed rails-1.2.4”.

Is it possible to install the gems for 2.0 PR?

So, what I did was :

rake rails:freeze:edge

Now that my app runs on edge Rails, I’ve got an error with a nested  
route  
that was working with 1.2.3, and I don’t understand how to solve it with  
2.0PR : in a view, I use \<%= edit\_person\_url(current\_user.company,  
current\_user) %\>.

I my routes.rb, I have :

map.resources :companies do |company|  
company.resources :people  
end

In rails 2.0, I get the following error :

undefined method `edit\_person\_url’ for #ActionView::Base:0x35485b4

So, here are my 2 questions :

1. Is it possible to update the RoR 2.0 gems? I’d like to be able to  
run ‘rails new\_test\_app’ to have an idea of the new defaults
2. Has anyone an idea about my routing error?

Any help would be greatly appreciated.  
Have a nice day, everybody.

Thomas.

---

<div class="post-metadata">

**Author:** ![tbaustert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Post date:** [October 7, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563/2 "2007-10-07T15:00:03Z")

</div>

> 1. Is it possible to update the RoR 2.0 gems?

Now it doesn’t work for me, also. Maybe because of 1.2.4 release?

> I’d like to be able to run ‘rails new\_test\_app’ to have an idea of the new defaults

You are already able to do that if you have frozen some application to  
edge:

ruby /path/to/your/application/vendor/rails/railties/bin/rails  
new\_test\_app

> 1. Has anyone an idea about my routing error?

You’re using nested resources. It should be  
`edit_company_person_url([@company, @person])`

---

<div class="post-metadata">

**Author:** ![tbaustert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Post date:** [October 8, 2007, 12:30am UTC](https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563/3 "2007-10-08T00:30:05Z")

</div>

On 10/7/07, Thomas B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> gem install rails --source [http://gems.rubyonrails.org](http://gems.rubyonrails.org)
> 
> All I get is “Successfully installed rails-1.2.4”.
> 
> Is it possible to install the gems for 2.0 PR?

This is a quirk of the 2.0 PR version numbering:

gem install rails -v ‘= 1.2.3.7707’ -s [http://gems.rubyonrails.org](http://gems.rubyonrails.org)

We’ll do a new release shortly to update the PR gem.

> In rails 2.0, I get the following error :
> 
> undefined method `edit\_person\_url’ for #ActionView::Base:0x35485b4

In 2.0, this is edit\_company\_person\_url

In 1.2.4, you can use both but will get a deprecation warning on  
edit\_person\_url.

Best,  
jeremy

---

<div class="post-metadata">

**Author:** ![tbaustert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Post date:** [October 8, 2007, 8:08am UTC](https://www.ruby-forum.com/t/upgrading-my-app-to-rails-2-0-a-few-problems-and-questions/116563/4 "2007-10-08T08:08:55Z")

</div>

Thanks to both of you for your answers.Kind regards,  
Thomas.
