Problem on rails 4.0

58 views
Skip to first unread message

Mehmet Emin İNAÇ

unread,
Aug 2, 2013, 5:18:25 AM8/2/13
to i18n-r...@googlegroups.com
Hi everybody, I'm using i18_routing gem with rails 4.0 and ruby 1.9.3. When try to get routes with rake routes command, i see an error;

[I18n] > localize route     :                          start_a_project (tr) => /start_a_project(.:format)
/home/vagrant/.rvm/gems/ruby-1.9.3-p194@rails_4/bundler/gems/rails-58cd859caa49/actionpack/lib/action_dispatch/journey/route.rb:46:in `requirements': undefined method `merge' for nil:NilClass (NoMethodError)

I think this error due to i18_routing gem which is on this 'https://github.com/ncri/i18n_routing.git' branch='rails4'

here is my route file;
localized(I18n.available_locales, :verbose => true) do
    match "start_a_project/" => "start_a_project#index", :as => 'start_a_project', :via => :get
  .
  .
  .
end

and here is a part of my yml file;
named_routes_path: 
    start_a_project/: yeni-proje-baslat

anybody know solution about this problem ?

Mehmet Emin İNAÇ

unread,
Aug 2, 2013, 9:25:33 AM8/2/13
to i18n-r...@googlegroups.com
in LocalizedMapping class, line = 337 (@requirements = nil)
this code causes no problem with other than match route declaration.

2 Ağustos 2013 Cuma 12:18:25 UTC+3 tarihinde Mehmet Emin İNAÇ yazdı:
Reply all
Reply to author
Forward
0 new messages