rake db : create 오픈 소스 프로젝트 kandan에 대한 db를 만들려고 할 때 오류 발생

그리고 b

마침내 오픈 소스 프로젝트 kandan 및 ruby에 필요한 모든 gem을 레일에 설치했지만 rake db : create를 실행하려고 할 때마다이 오류가 발생하고 수정 방법을 모르겠습니다. 누구든지 나를 도울 수 있다면 대단히 감사하겠습니다 :)

kandan dan$ rake db:create
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
rake aborted!
LoadError: cannot load such file -- guard/guard
/Users/dan/kandan/config/application.rb:13:in `<top (required)>'
/Users/dan/kandan/Rakefile:5:in `<top (required)>'
LoadError: cannot load such file -- guard-spork
/Users/dan/kandan/config/application.rb:13:in `<top (required)>'
/Users/dan/kandan/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

--trace 오류에 관심이있는 사람 :

rake db:create --trace
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
rake aborted!
LoadError: cannot load such file -- guard/guard
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/guard-spork-1.5.1/lib/guard/spork.rb:2:in `<top (required)>'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:85:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:85:in `rescue in block in require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:68:in `block in require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
/Users/dan/kandan/config/application.rb:13:in `<top (required)>'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/dan/kandan/Rakefile:5:in `<top (required)>'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in `block in run'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/dan/.rbenv/versions/2.2.2/bin/rake:33:in `<main>'
LoadError: cannot load such file -- guard-spork
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
/Users/dan/kandan/config/application.rb:13:in `<top (required)>'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/dan/kandan/Rakefile:5:in `<top (required)>'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in `block in run'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/dan/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/dan/.rbenv/versions/2.2.2/bin/rake:33:in `<main>'

편집하다

다음은 /Users/dan/kandan/config/application.rb에 있습니다.

require File.expand_path('../boot', __FILE__)

# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

require "./lib/kandan_config.rb"

module Kandan
  class Application < Rails::Application
    # Dealing with Heroku-specific eccentricities
    config.assets.initialize_on_precompile = false

    # 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.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    config.active_record.observers = [:activity_observer, :attachment_observer, :channel_observer, :user_observer]

    # 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

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    config.assets.precompile += ["admin/admin.js", "admin.css"]

    # Use SQL instead of Active Record's schema dumper when creating the database.
    # This is necessary if your schema can't be completely dumped by the schema dumper,
    # like if you have constraints or database-specific column types
    # config.active_record.schema_format = :sql

    # Enforce whitelist mode for mass assignment.
    # This will create an empty whitelist of attributes available for mass-assignment for all models
    # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
    # parameters by using an attr_accessible or attr_protected declaration.
    config.active_record.whitelist_attributes = true
    config.active_record.mass_assignment_sanitizer = :strict

    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'
  end
end

편집 여기에 내 가드 파일이 있습니다.

# A sample Guardfile
# More info at https://github.com/guard/guard#readme


guard 'rspec' do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }

  # Rails example
  watch(%r{^app/(.+)\.rb$})                           { |m| "spec/#{m[1]}_spec.rb" }
  watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
  watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  watch(%r{^spec/support/(.+)\.rb$})                  { "spec" }
  watch('config/routes.rb')                           { "spec/routing" }
  watch('app/controllers/application_controller.rb')  { "spec/controllers" }

  # Capybara features specs
  watch(%r{^app/views/(.+)/.*\.(erb|haml)$})          { |m| "spec/features/#{m[1]}_spec.rb" }

  # Turnip features and steps
  watch(%r{^spec/acceptance/(.+)\.feature$})
  watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$})   { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end


guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
  watch('config/application.rb')
  watch('config/environment.rb')
  watch('config/environments/test.rb')
  watch(%r{^config/initializers/.+\.rb$})
  watch('Gemfile')
  watch('Gemfile.lock')
  watch('spec/spec_helper.rb') { :rspec }
  watch('test/test_helper.rb') { :test_unit }
  watch(%r{features/support/}) { :cucumber }
end

편집 여기에 내 gemfile이 있습니다.

source 'https://rubygems.org'

# Core gems
gem 'rails', '~> 3.2.21'

# Database adapters
gem 'pg'

# Uncomment next line when using MySQL database
#gem 'mysql2'

# Auth gems
gem 'devise'
gem 'cancancan', '~> 1.9'

# Server/transport gems
gem 'thin'
gem 'faye'

# Helper gems
gem 'kaminari'
gem 'aws-sdk'
gem 'paperclip'
gem 'remotipart'
gem 'jquery-rails'
gem 'enumerize'
gem 'arel'
gem 'tzinfo'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'
  gem 'bourbon'
  gem 'execjs'
  gem 'eco'
  gem 'uglifier'
  gem 'bootstrap-sass', '3.1.1.0'
  gem 'sass', '3.2.13'
  gem 'gemoji', '~> 1.5.0'
end

group :production do
  gem 'kandan-count'
end

group :development do
  gem 'kandan-count-dev'
  gem 'pry-rails'
  gem 'quiet_assets'
  gem 'awesome_print'
  gem 'better_errors'
  gem 'binding_of_caller'
  if RUBY_VERSION >= '2.0.0'
    gem 'byebug'
  else
    gem 'debugger'
  end
end

group :test do
  gem 'faker'
  gem 'rspec-rails', '~> 3.1'
  gem 'shoulda-matchers'
  gem 'factory_girl_rails'
  gem 'simplecov', :require => false
  gem 'coveralls', :require => false
  gem 'poltergeist'
  gem 'launchy'
  gem 'capybara'
end

group :development, :test do
  gem 'sqlite3'
  gem 'guard'
  gem 'guard-rspec'
  gem 'guard-spork'
  gem 'database_cleaner'
  gem 'jasmine'
end
user5202746

Gemfile을 기반으로 Gemfile에서 spork가 누락되었다고 말할 수 있습니다. Gemfile을 다음과 같이 편집하십시오.

 group :development, :test do
      gem 'sqlite3'
      gem 'spork', :git => 'git://github.com/sporkrb/spork.git'
      gem 'spork-rails' 
      gem 'guard'
      gem 'guard-rspec'
      gem 'guard-spork'
      gem 'database_cleaner'
      gem 'jasmine'
    end

그런 다음 bundle install터미널에서 실행하여 초기화를 실행하십시오.

spork rspec --bootstrap

다음을 실행하여 Guardfile을 다시 생성하십시오.

guard init rspec
gurad init spork

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

sylius 프로젝트를 만들려고 할 때 composer에서 설치 요청 오류가 발생합니까?

분류에서Dev

탭 막대로 스 와이프보기를 만들려고 할 때 오류 발생

분류에서Dev

다른 시스템에서 이식 된 rails 프로젝트에서 "rake : db create"를 실행할 수 없습니다.-오류 메시지가 나타납니다.

분류에서Dev

Flask에 대한 가상 Venv를 만들려고 할 때 치명적인 오류가 발생합니까?

분류에서Dev

cloudsql 인스턴스를 다시 만들려고 할 때 "프로젝트의 리소스가 충돌의 대상입니다"라는 오류가 발생하는 이유는 무엇입니까?

분류에서Dev

명령 줄에서 Qt 프로젝트를 빌드 할 때만 오류 발생

분류에서Dev

Access DB에 값을 저장하려고하지만 ExecuteNonQuery를 시도 할 때 오류가 발생합니다.

분류에서Dev

DB 항목에 액세스 할 때 eloquvent 오류 발생

분류에서Dev

드로어 블 리소스 파일을 만들려고 할 때 Android Studio에서 이상한 오류가 발생합니다.

분류에서Dev

Docker에서 심볼릭 링크를 만들려고 할 때 "프로토콜 오류"발생

분류에서Dev

Visual Studio 2015에서 Visual Basic 응용 프로그램에 대한 로그인 스크립트를 구현하려고 할 때 오류 발생

분류에서Dev

heroku run rake db : migrate in production을 실행할 때이 오류가 발생합니다.

분류에서Dev

유효한 LatLng 개체에서 LatLngBounds 개체를 만들려고 할 때 오류가 발생했습니다.

분류에서Dev

에이전트 풀을 만들려고 할 때 오류가 발생 함

분류에서Dev

Python CLI에서 DB 변수를 가져 오려고 할 때 Flask Sqlalchemy에서 오류가 발생 함

분류에서Dev

boost :: serialization 및 arcive를 사용하여 개체를 원하는대로 만들려고 할 때 "입력 스트림 오류"가 발생합니다.

분류에서Dev

프로젝트를 만들 때 Vue CLI에 오류 코드 4058이 발생 함

분류에서Dev

VS 2015에서 Xamarin.Android 프로젝트를 만들 때 오류 발생

분류에서Dev

SQLServer 2019를 대상으로 할 때 Visual Studio 2019 SSIS 프로젝트에서 80040153 오류가 발생합니다.

분류에서Dev

Heroku가 db : migrate rake에서 오류를 발생시킵니다.

분류에서Dev

새 Android 프로젝트를 만들 때 오류 발생

분류에서Dev

R에서 임의 순열 테스트 함수를 만들고 사용하려고 할 때 발생하는 오류

분류에서Dev

SQL Server DB를 삭제하려고 할 때 발생하는 오류 21

분류에서Dev

xslt 스타일 시트 --xml에서 csv로 : 동적 결과 문서 (exist-db)에서 for-each 루프를 사용할 때 오류가 발생했습니다.

분류에서Dev

Lua 헤더를 C ++ 프로젝트로 가져 오려고 할 때 링커 오류가 발생합니까?

분류에서Dev

Firebase 함수 db.doc가 함수가 아닙니다. 문서로 새 컬렉션을 만들려고 할 때 오류 발생

분류에서Dev

주어진 필드에 지정된 클래스에 대한 비교를 만들려고 할 때 오류

분류에서Dev

Android에서 SQLite DB를 생성 할 때 오류 발생 (코드 1)

분류에서Dev

SSIS / SSRS-VS 2017에서 SSIS에 대한 새 프로젝트를 만들 때이 오류가 발생합니다.

Related 관련 기사

  1. 1

    sylius 프로젝트를 만들려고 할 때 composer에서 설치 요청 오류가 발생합니까?

  2. 2

    탭 막대로 스 와이프보기를 만들려고 할 때 오류 발생

  3. 3

    다른 시스템에서 이식 된 rails 프로젝트에서 "rake : db create"를 실행할 수 없습니다.-오류 메시지가 나타납니다.

  4. 4

    Flask에 대한 가상 Venv를 만들려고 할 때 치명적인 오류가 발생합니까?

  5. 5

    cloudsql 인스턴스를 다시 만들려고 할 때 "프로젝트의 리소스가 충돌의 대상입니다"라는 오류가 발생하는 이유는 무엇입니까?

  6. 6

    명령 줄에서 Qt 프로젝트를 빌드 할 때만 오류 발생

  7. 7

    Access DB에 값을 저장하려고하지만 ExecuteNonQuery를 시도 할 때 오류가 발생합니다.

  8. 8

    DB 항목에 액세스 할 때 eloquvent 오류 발생

  9. 9

    드로어 블 리소스 파일을 만들려고 할 때 Android Studio에서 이상한 오류가 발생합니다.

  10. 10

    Docker에서 심볼릭 링크를 만들려고 할 때 "프로토콜 오류"발생

  11. 11

    Visual Studio 2015에서 Visual Basic 응용 프로그램에 대한 로그인 스크립트를 구현하려고 할 때 오류 발생

  12. 12

    heroku run rake db : migrate in production을 실행할 때이 오류가 발생합니다.

  13. 13

    유효한 LatLng 개체에서 LatLngBounds 개체를 만들려고 할 때 오류가 발생했습니다.

  14. 14

    에이전트 풀을 만들려고 할 때 오류가 발생 함

  15. 15

    Python CLI에서 DB 변수를 가져 오려고 할 때 Flask Sqlalchemy에서 오류가 발생 함

  16. 16

    boost :: serialization 및 arcive를 사용하여 개체를 원하는대로 만들려고 할 때 "입력 스트림 오류"가 발생합니다.

  17. 17

    프로젝트를 만들 때 Vue CLI에 오류 코드 4058이 발생 함

  18. 18

    VS 2015에서 Xamarin.Android 프로젝트를 만들 때 오류 발생

  19. 19

    SQLServer 2019를 대상으로 할 때 Visual Studio 2019 SSIS 프로젝트에서 80040153 오류가 발생합니다.

  20. 20

    Heroku가 db : migrate rake에서 오류를 발생시킵니다.

  21. 21

    새 Android 프로젝트를 만들 때 오류 발생

  22. 22

    R에서 임의 순열 테스트 함수를 만들고 사용하려고 할 때 발생하는 오류

  23. 23

    SQL Server DB를 삭제하려고 할 때 발생하는 오류 21

  24. 24

    xslt 스타일 시트 --xml에서 csv로 : 동적 결과 문서 (exist-db)에서 for-each 루프를 사용할 때 오류가 발생했습니다.

  25. 25

    Lua 헤더를 C ++ 프로젝트로 가져 오려고 할 때 링커 오류가 발생합니까?

  26. 26

    Firebase 함수 db.doc가 함수가 아닙니다. 문서로 새 컬렉션을 만들려고 할 때 오류 발생

  27. 27

    주어진 필드에 지정된 클래스에 대한 비교를 만들려고 할 때 오류

  28. 28

    Android에서 SQLite DB를 생성 할 때 오류 발생 (코드 1)

  29. 29

    SSIS / SSRS-VS 2017에서 SSIS에 대한 새 프로젝트를 만들 때이 오류가 발생합니다.

뜨겁다태그

보관