gpt4 book ai didi

ruby-on-rails-3 - Rails 3 + Heroku : cannot load such file -- test/unit/testcase (LoadError)

转载 作者:行者123 更新时间:2023-12-02 23:21:29 24 4
gpt4 key购买 nike

在heroku 中运行控制台时出现以下错误(heroku run console...)。该应用程序运行没有问题,但我似乎因此无法运行控制台,并且在开发中我没有遇到此问题。

/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/test_case.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/console/app.rb:2:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:304:in `initialize_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:152:in `load_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:27:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

这是我的 Gemfile:

source 'http://rubygems.org'
ruby '1.9.3'

gem 'rails', '3.2.9'

gem 'oauth', '~> 0.4.4'
gem 'twitter', '~> 1.4.1'
gem 'sendgrid'
gem 'koala'

gem 'therubyracer', '0.10.2'
gem 'execjs'

# Rails 3.1 - Asset Pipeline
gem 'json'

group :assets do
gem 'sass-rails', " >= 3.2.3"
gem 'coffee-rails', ">= 3.2.1"
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass'
end

gem 'coffee-script'

gem 'jquery-rails'

gem "fog"
gem 'bootstrap-wysihtml5-rails', '0.3.1.10'

group :production do
gem "heroku"
gem 'pg', '0.13'
gem 'newrelic_rpm'
gem 'newrelic_api'
end

group :test do
gem 'email_spec'
gem "cucumber-rails"
gem "rspec-rails"
gem "capybara"
gem 'culerity'
gem "selenium-webdriver"
gem "database_cleaner"
gem 'factory_girl_rails'
end

group :development, :grades, :test do
gem "launchy"
gem "mysql2"
gem "letter_opener"
gem "pry"
gem "rails-erd"
end

gem "airbrake"
gem "authlogic"
gem 'awesome_print'
gem 'cancan'
gem 'dalli'

#gem "oink"
gem 'validates_timeliness', '~> 3.0.2'
gem 'hpricot'
gem "ruby_parser"
gem "prawn_rails"
gem "thin"
gem "nested_form", :git => "git://github.com/ryanb/nested_form.git"
gem "meta_search"
gem "carrierwave"
gem "aws-s3"
gem "mini_magick"
gem 'will_paginate'
gem "spreadsheet"
gem "oauth-plugin", ">= 0.4.0.pre1"
gem 'flash_cookie_session'
gem 'haml-rails'
gem 'squeel'
gem 'rails_best_practices', :group => :development
gem 'simple_form'
gem 'taps', :group => :development
gem 'resque'
gem "audited-activerecord", "~> 3.0"
gem "lograge"
gem 'quiet_assets'
gem 'yajl-ruby', :require => "yajl"
gem 'switch_user'

我不知道为什么会收到此错误。有什么想法吗?谢谢

最佳答案

对于 Rails 3.1.12 和 Ruby 2.2.0,我必须添加

gem 'test-unit'

到我的Gemfile

关于ruby-on-rails-3 - Rails 3 + Heroku : cannot load such file -- test/unit/testcase (LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13828889/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com