我的rails c
命令挂起。服务器运行正常。
这是我终止(Ctrl + C)时显示的内容:
rails c
^C/Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `gets': Interrupt
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `verify_server_version'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/run.rb:62:in `run'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/run.rb:42:in `warm_run'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/run.rb:35:in `call'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/rails.rb:24:in `call'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/TuzsNewMacBook/Library/Mobile Documents/com~apple~CloudDocs/Development/code/Rails/fares-you-can-use-rails/bin/spring:15:in `require'
from /Users/TuzsNewMacBook/Library/Mobile Documents/com~apple~CloudDocs/Development/code/Rails/fares-you-can-use-rails/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
我一直在努力将Devise Omniauth添加到我的应用中。我认为上一次加载控制台是在我开始进行此操作之前。我还添加了dotenv-rails
,如果有什么不同(它似乎工作正常)。这是我的设计初始化程序:
# frozen_string_literal: true
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
config.mailer_sender = 'xxxx.xxxx@gmail.com'
config.mailer = 'Devise::Mailer'
config.parent_mailer = 'ActionMailer::Base'
require 'devise/orm/active_record'
config.authentication_keys = [:email]
config.case_insensitive_keys = [:email]
config.strip_whitespace_keys = [:email]
config.params_authenticatable = true
config.http_authenticatable = false
config.http_authenticatable_on_xhr = true
config.http_authentication_realm = 'Application'
config.skip_session_storage = [:http_auth]
config.clean_up_csrf_token_on_authentication = true
config.stretches = Rails.env.test? ? 1 : 11
config.reconfirmable = true
config.expire_all_remember_me_on_sign_out = true
config.password_length = 6..128
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
config.reset_password_within = 6.hours
config.navigational_formats = ['*/*', :html]
config.sign_out_via = :delete
config.omniauth :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']
end
如果有帮助,这是我的路线。
Rails.application.routes.draw do
get 'regions/index'
get 'regions/show'
resources :deals, param: :slug
resources :regions, param: :slug, only: [:index, :show] do
resources :deals, only: [:index, :show, :edit, :destroy]
end
root to: "deals#index"
# Omniauth
devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' }
get 'pry', to: 'application#pry'
end
有什么想法吗?谢谢!