Thomas Balthazar
2007-Oct-07 10:41 UTC
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 gems<http://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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mislav
2007-Oct-07 12:59 UTC
Re: Upgrading my App to Rails 2.0 : a few problems and questions
> 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 defaultsYou 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> 2. Has anyone an idea about my routing error?You''re using nested resources. It should be `edit_company_person_url([@company, @person])` --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeremy Kemper
2007-Oct-07 22:29 UTC
Re: Upgrading my App to Rails 2.0 : a few problems and questions
On 10/7/07, Thomas Balthazar <thomas.tmp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.> 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>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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thomas Balthazar
2007-Oct-08 06:08 UTC
Re: Upgrading my App to Rails 2.0 : a few problems and questions
Thanks to both of you for your answers.Kind regards, Thomas. On 10/8/07, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> > > On 10/7/07, Thomas Balthazar <thomas.tmp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. > > > > 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> > > 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 > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---