Rails - 部署中失败的路由 [英] Rails - Failing Routes in deployment

查看:101
本文介绍了Rails - 部署中失败的路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 命名空间admindo 
#仅限行政路线
root:to => 'home#index'
资源:评论做
会员做
获得:批准
获得:拒绝
结束
结束
资源:用户do
member do
get:block
get:unblock
end
end
end

在本地浏览/ admin时,我会看到相应的页面。
在heroku版本的同一个网址上,我得到了一个404.这条路线在'heroku rake routes'中正确显示



日志显示:

  ActionController :: RoutingError(错误的常量名Admin / 
homeController):
/ disk1 / home / slugs / 196384_c95a9e3_4463 / mnt / .bundle / gems / gems /
activesupport-3.0.0.beta4 / lib / active_support / inflector / methods.rb:
103:在`const_defined?'

有什么想法?

解决方案

发现这是我们在Gemfile中找到的right_aws gem的问题。


I have an app that has the following in the routes file:

  namespace "admin" do 
    # ADMINISTRATIVE ROUTES ONLY 
    root :to => 'home#index' 
    resources :comments do 
      member do 
        get :approve 
        get :reject 
      end 
    end 
    resources :users do 
      member do 
        get :block 
        get :unblock 
      end 
    end 
  end 

When browing to /admin locally, I am greeted by the appropriate page. On the same URL on the heroku version I get a 404. The route shows correctly in 'heroku rake routes'

Logs are showing:

ActionController::RoutingError (wrong constant name Admin/ 
homeController): 
/disk1/home/slugs/196384_c95a9e3_4463/mnt/.bundle/gems/gems/ 
activesupport-3.0.0.beta4/lib/active_support/inflector/methods.rb: 
103:in `const_defined?'

Any ideas?

解决方案

It transpires that this is an issue with the right_aws gem that we had in our Gemfile.

这篇关于Rails - 部署中失败的路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆