2

我在这里搜索,没有得到任何线索。

这是我运行时的错误消息rake db:schema:load RAILS_ENV=production

Initializing database schema
rake aborted!
no such file to load -- 1.9/redcloth_scan
Couldn't load 1.9/redcloth_scan
The $LOAD_PATH was:
c:/Ruby192/lib/ruby/gems/1.9.1/gems/icalendar-1.1.6/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/will_paginate-3.0.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/uglifier-1.0.4/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-rails-3.1.4/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/sass-3.1.10/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rufus-scheduler-2.0.11/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/remotipart-1.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/prototype-rails-3.1.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/paperclip-2.4.5/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/net-ldap-0.2.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.7/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.7/ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/jquery-rails-1.0.16/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/icalendar-1.1.6/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/gchartrb-0.8/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/exception_notification_rails3-1.2.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/dynamic_form-1.1.4/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/devise-1.4.9/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/warden-1.0.6/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/orm_adapter-0.0.5/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/daemons-1.1.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/coffee-rails-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rdoc-3.11/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.6.1/ext/json/ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.6.1/ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-ssl-1.3.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/coffee-script-source-1.1.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/cocaine-0.2.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/acts_as_tree-0.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/acts_as_list-0.1.4/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/activeresource-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/tzinfo-0.3.30/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/arel-2.2.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/actionmailer-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/mail-2.3.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/treetop-1.4.10/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/polyglot-0.3.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/mime-types-1.17.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.0.3/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/hike-1.2.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-test-0.6.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-mount-0.8.3/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-cache-1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/erubis-2.7.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/activemodel-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/i18n-0.6.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/builder-3.0.0/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/multi_json-1.0.3/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.8/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.8/lib/case_sensitive_require
c:/Ruby192/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.8/ext
c:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib
c:/Ruby192/lib/ruby/site_ruby/1.9.1
c:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
c:/Ruby192/lib/ruby/site_ruby
c:/Ruby192/lib/ruby/vendor_ruby/1.9.1
c:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
c:/Ruby192/lib/ruby/vendor_ruby
c:/Ruby192/lib/ruby/1.9.1
c:/Ruby192/lib/ruby/1.9.1/i386-mingw32
c:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1/lib/action_controller/vendo
r/html-scanner

然后我打开了文件c:\Ruby192\lib\ruby\gems\1.9.1\gems\RedCloth-4.2.8\lib\redcloth.rb,不知道为什么,它会抱怨C:\Ruby192\lib\ruby\gems\1.9.1\gems\RedCloth-4.2.8\ext\redcloth_scan找不到文件夹(可能)吗?所以在这里粘贴代码片段:

require 'rbconfig'
begin
  prefix = Config::CONFIG['arch'] =~ /mswin|mingw/ ? "#{Config::CONFIG['MAJOR']}.#{Config::CONFIG['MINOR']}/" : ''
  lib = "#{prefix}redcloth_scan"
  require lib
rescue LoadError => e
  e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}
  raise e
end
4

0 回答 0