`
- 浏览:
29833 次
- 性别:
- 来自:
北京
-
rails3 ActionController::RoutingError (uninitialized constant ApplicationControl
rails3 ActionController::RoutingError (uninitialized constant ApplicationController::LoginSystem)
碰到了这个问题,是因为rails3 不进行自动加载lib目录下的自定义module 了
需要在config/application.rb文件中
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths +=%W(#{config.root}/extras)
这两句就是进行让你启动时加载 classes 、modules的目录,你需要去设置才行,rails3 不给你自动加载。
改成如下格式就可以了:
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib)
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
使用 Rails 4 的简单聊天应用程序 - ActionController::Live 应用组件: 1 . 使用 Rails 4 ActionController::Live 的聊天应用程序 2 . 基本 LDAP 身份验证 3 . Redis 服务器集成 4 . 彪马服务器 1 . Rails 4 ...
Rails::API 移除了 ActionView 和其他一些渲染功能,不关心Web前端的开发者可更容易、快速地开发应用程序,因此运行速度比正常的 Rails 应用程序要快。 Rails::API 可以用来创建只提供API服务(API-Only)的 Rails ...
使用Rails构建可伸缩和可维护API的最佳方法
Rails :: Controller :: Testing 这个gem将assigns给控制器测试的内容以及assert_template带回assigns控制器和集成测试的内容。 这些方法已中。 安装 将此行添加到您的应用程序的Gemfile中: gem 'rails-...
Component-Based Rails Applications: Large Domains Under Control (Addison-Wesley Professional Ruby Series) By 作者: Stephan Hagemann ISBN-10 书号: 0134774582 ISBN-13 书号: 9780134774589 Edition 版本: ...
gem "mongoid_rails_migrations" 如何使用 创建迁移 $ rails generate mongoid:migration 运行迁移: $ rails db:migrate $ rails db:migrate:down VERSION= $ rails db:migrate:up VERSION= $ rails db:rollback...
首先,请确保您已经创建了Rails应用程序 rails new APP_NAME 设置 确保您具有这些依赖项 yarn add jquery popper.js 确保Rails Gemfile包含以下宝石 # Gemfile gem 'autoprefixer-rails' gem 'simple_form' 在您的...
OmniAuth-Rails CSRF保护该gem通过实现直接使用Rails的ActionController::RequestForgeryProtection代码的CSRF令牌验证程序,缓解了 (在将OmniAuth gem与Ruby on Rails应用程序结合使用时在请求阶段进行跨站点请求...
webpack-rails, 将 web pack与你的Ruby on Rails 应用程序集成 不再维护webpack-rails 不再被维护。 有关详细信息,请参阅 #90. web pack-railsweb pack 为你提供了将 web pack集成到现有的Ruby on Rails 应用程序中...
或者,如果禁用了Bundler自动请求功能,则在config/application.rb require 'sprockets/railtie' 。 用法 耙任务 rake assets:precompile 将config.assets.precompile列出的所有资产编译为public/assets部署任务。...
用于 Rails 应用程序的 Puppet 模块重要:不稳定和工作真的真的还在进步这个模块设置了一...用法示例: class { 'rails_application::globals' : ruby_version => ' 2.2.1 ' , database_engine => ' postgresql '}rails
ROR环境 Ruby version 1.9.3 (java) RubyGems version 1.8.24 Rack version 1.4 ...Application root C:/MyWorks/rubydemo Environment development Database adapter jdbcmysql Database schema version 0
程序 博文链接:https://zhangjingqiang.iteye.com/blog/47041
For-Rails-Beginners::Japanese_symbol_for_beginner:Ruby on Rails的初学者有福了
turbo-sprockets-rails3, 加速你的Rails 3资产 用于 Rails 3.2.x的涡轮链轮 通过只根据源文件的哈希来重新编译已经更改的资产,从而加快 Rails 3 rake assets:precompile的速度只编译一次以生成指纹和非打印的资产...
Rails 6.0 + WebPack + Bootstrap 4.3 + FontAwesome入门应用程序 此入门应用程序使用ruby 2.6.3,下载或克隆此项目,然后运行以下命令: bundle install 如果要重命名项目,请运行DISABLE_SPRING=1 rails g ...
如果您在非Rails应用程序中需要类似的功能,请考虑直接使用(这是处理内幕消毒的原因)。 安装 将此行添加到您的应用程序的Gemfile中: gem 'rails-html-sanitizer' 然后执行: $ bundle 或将其自己安装为: $...
This short early adopter book details both how you'll upgrade existing web and other applications from Rails 4.2...Chapter 3: Active Record Chapter 4: Testing Chapter 5: Rails API Chapter 6: Action Cable
Rails 3 in Action 2011年9月新鲜出炉,针对最新的Rails 3.1进行说明