我将系统更新为opensuse 11.4,并通过RVM设置了Ruby 1.9.2。我重新安装了所有的宝石和更新的包都没有问题。更新操作系统后的Rails应用程序错误
的问题是模糊的错误运行应用程序时,我得到:
ActionController::RoutingError (undefined method `sub' for nil:NilClass):
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/news_controller.rb:1:in `<top (required)>'
我甚至不知道从哪里开始查找问题。第1行的两个文件都是类声明。即类NewsController < ApplicationController和类ApplicationController < ActionController :: Base。这两个文件都没有方法调用'sub',也没有给出其他信息。
该应用程序的工作完美升级(这是使用Rails 3.0.5还)之前,所以我认为这个问题是某处Rails中,除了一个简单的支架上运行新的应用程序已经没有问题。 news#index
是路由文件的根目录,但将根目录更改为其他内容不会执行任何操作。
编辑:
resources :categories,:addresses,:calendars,:topics,:profile,:news,:account_setting
resources :boards do
member do
get :move
post :move_category
end
end
get "user/index"
get 'login/index'
get 'login/new'
post 'login/create'
post 'login/authenticate'
get 'login/forgot_password'
put 'login/reset_password'
root :to => "news#index"
你可以发布你的路由文件的地方? –