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

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
gemshttp://weblog.rubyonrails.org/2007/9/30/rails-2-0-0-preview-release
like this :

gem install rails --source 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.

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

On 10/7/07, Thomas B. [email protected] wrote:

gem install rails --source 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

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

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