首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails生产路线问题

Rails生产路线问题
EN

Stack Overflow用户
提问于 2013-11-28 10:52:00
回答 2查看 3K关注 0票数 2

在生产过程中,我在日志中得到了以下内容:

我,2013年-11-28T10:37:59.495396 #1181信息-:Started "/javascripts/application.js“用于91.104.133.126在2013年-11-28 10:37:59 +0000 F,2013-11-28T10:37:59.497931 #1181致命-:ActionController::RoutingError (没有路由匹配获取"/javascripts/application.js"):

和:

我,2013年-11-28T10:41:05.611348 #1181信息2013-11-28T10:41:05.629343 #1181 INFO

这不是在发展过程中发生的。

App是运行与RVM & NginX和乘客,所有最新版本,新安装。

更新1:

在运行RAILS_ENV=production bundle exec rake assets:precompile之后,我得到了以下内容:

操作控制器::RoutingError(没有路由匹配获得"/assets/application-0292b59e3ea25ff21b6f72e062924c42.css"):) actionpack (4.0.1) lib/action_分派/ ActionController::RoutingError (没有路由匹配- GET“/javascripts/RoutingError/现代化.No”): 操作控制器::RoutingError(没有路由匹配获得"/assets/application-2f1ac76c2ad0b69f7bbab4b9d9dca4b8.js"):)

更新2:

rake routes输出

代码语言:javascript
复制
                  Prefix Verb   URI Pattern                Controller#Action
              images_new GET    /images/new(.:format)      images#new
           users_sign_up GET    /users/sign_up(.:format)   users#sign_up
             images_edit GET    /images/edit(.:format)     images#edit
            images_index GET    /images/index(.:format)    images#index
             images_show GET    /images/show(.:format)     images#show
               posts_new GET    /posts/new(.:format)       posts#new
              posts_edit GET    /posts/edit(.:format)      posts#edit
            posts_update GET    /posts/update(.:format)    posts#update
           posts_destroy GET    /posts/destroy(.:format)   posts#destroy
        new_user_session GET    /users/sign_in(.:format)   devise/sessions#new
            user_session POST   /users/sign_in(.:format)   devise/sessions#create
    destroy_user_session DELETE /users/sign_out(.:format)  devise/sessions#destroy  cancel_user_registration GET /users/cancel(.:format)    devise/registrations#cancel
       user_registration POST   /users(.:format)           devise/registrations#create     new_user_registration GET

/users/sign_up(.:format)   devise/registrations#new   edit_user_registration GET    /users/edit(.:format)      devise/registrations#edit
                         PATCH  /users(.:format)           devise/registrations#update
                         PUT    /users(.:format)           devise/registrations#update
                         DELETE /users(.:format)           devise/registrations#destroy
              pages_home GET    /pages/home(.:format)      pages#home
                   posts GET    /posts(.:format)           posts#index
                         POST   /posts(.:format)           posts#create
                new_post GET    /posts/new(.:format)       posts#new
               edit_post GET    /posts/:id/edit(.:format)  posts#edit
                    post GET    /posts/:id(.:format)       posts#show
                         PATCH  /posts/:id(.:format)       posts#update
                         PUT    /posts/:id(.:format)       posts#update
                         DELETE /posts/:id(.:format)       posts#destroy
                  images GET    /images(.:format)          images#index
                         POST   /images(.:format)          images#create
               new_image GET    /images/new(.:format)      images#new
              edit_image GET    /images/:id/edit(.:format) images#edit
                   image GET    /images/:id(.:format)      images#show
                         PATCH  /images/:id(.:format)      images#update
                         PUT    /images/:id(.:format)      images#update
                         DELETE /images/:id(.:format)      images#destroy
                    root GET    /                          pages#home
EN

回答 2

Stack Overflow用户

发布于 2014-04-05 23:35:33

尝试在config.assets.compile = true中设置produciton.rb

票数 3
EN

Stack Overflow用户

发布于 2013-11-28 20:45:24

通过在config.serve_static_assets = true中设置production.rb来解决

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20264092

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档