- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试安装 Doorkeeper在新的 rails (4.0.2) 上安装。在我将 gem 添加到 gemfile 并安装它之后,我尝试运行
rails generate doorkeeper:install
并得到以下错误:
/Users/mam8cc/Projects/doorkeeper/config/application.rb:10:in `<module:Doorkeeper>': uninitialized constant Doorkeeper::Rails::Application (NameError)
from /Users/mam8cc/Projects/doorkeeper/config/application.rb:9:in `<top (required)>'
from /Users/mam8cc/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/commands.rb:43:in `require'
from /Users/mam8cc/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/commands.rb:43:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我的应用.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module Doorkeeper
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
end
end
还有我的 Gemfile 留给子孙后代
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'doorkeeper'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
最佳答案
问题在于您的项目与您尝试安装的包同名。更改项目的名称,它应该可以工作。
关于ruby-on-rails - 安装门卫 : Uninitialized Constant Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21718994/
我正在压倒门卫 AuthorizationsController .作为docs建议我从 AuthorizationsController 继承.现在下面的代码显示了我最新的覆盖尝试。 我目前拥有的
目标 :当 nginx 入口具有事件重写目标功能时,Keycloak 网守部署。 Ingress 根据以下内容重写目标: rewrite.bar.com/something/重写为 rewrite.b
我正在使用带有 Doorkeeper gem 的 Rails 3.2 为第 3 方提供 OAuth 2 API。从应用程序外部使用我的 REST API 时,我不断收到此警告: 警告:无法验证 CSR
我希望我的门卫 View 使用应用程序布局: https://github.com/applicake/doorkeeper/wiki/Customizing-views 这包含主应用程序的路由和辅助
在提供授权的Rails(5.2.3)应用程序上将doorkeeper从5.1.0 gem升级到5.2.1后,请求授权的应用程序的登录不再起作用。授权应用程序上的页面指出缺少必需参数:范围。尽管我们不使
我是一名优秀的程序员,十分优秀!