2011-01-31 15 views
5

Windows 7で実行されている2.3.8アプリ、サーバを起動しようとすると、次のエラーを取得:ロードするようなファイル - 私のレールでactive_support/core_ext(とLoadError)

D:\app1>ruby script/server 
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- active_support/core_ext (LoadError) 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' 
     from D:/app1/vendor/rails/activesupport/lib/active_support.rb:56 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from D:/app1/vendor/rails/railties/lib/commands/server.rb:1 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
     from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
     from script/server:3 

カスタムで必要に次のように以下のファイルブロック...ライン36は "gem_original_requireパス"

def require(path) # :doc: 
    gem_original_require path 
    rescue LoadError => load_error 
    if load_error.message =~ /#{Regexp.escape path}\z/ and 
     spec = Gem.searcher.find(path) then 
     Gem.activate(spec.name, "= #{spec.version}") 
     gem_original_require path 
    else 
     raise load_error 
    end 
    end 

宝石のリストです:

actionmailer (2.3.8) 
actionpack (2.3.8) 
activerecord (2.3.8) 
activeresource (2.3.8) 
activesupport (2.3.8) 
builder (3.0.0) 
calendar_date_select (1.16.1) 
cgi_multipart_eof_fix (2.5.0) 
gem_plugin (0.2.3) 
google4r-checkout (1.0.6.1) 
i18n (0.5.0) 
liquid (2.2.2) 
money (3.5.5) 
mongrel (1.1.5 x86-mingw32) 
mysql (2.8.1 x86-mingw32) 
rack (1.1.0) 
rails (2.3.8) 
rake (0.8.7) 
rmagick (2.12.0 mswin32) 

が見えましたエラーの一部で回っていますが、どこから始めたらいいか分かりません。

答えて

1

C:\Ruby\lib\ruby\gems\1.8\gems\activesupport-2.3.8\lib\active_support 

core_ext.rb

ファイル名を作成し、次の行

filenames = Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].sort.map do |path| 
    File.basename(path, '.rb') 
end 

# deprecated 
filenames -= %w(blank) 

filenames.each { |filename| require "active_support/core_ext/#{filename}" } 
+0

このディレクトリには、指定した内容と同じファイルが既にあります。試してくれてありがとう。 – Jay

5

にコンテンツを追加、編集スタックトレースを見るだけで、アプリケーションがドライブ "D"にあり、ルビーファイルがドライブ "C"にあるようです。多分

その必要な

filenames = Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].sort.map do |path| 
    File.basename(path, '.rb') 
end 

それは「C」でなければならないときには「D」にそのパスを要求を行います。それは私の最高の推測です。がんばろう。

+0

これはずいぶん前のことで、エラーが発生したマシンを+1することは可能な解決策ではありません。他の人に役立つと確信しています。 – Jay

関連する問題