当我尝试使用rails服务器运行项目时,我收到以下错误
C:\Workspace\combomeal>rails server
C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_supp
ort/dependencies.rb:251:in `require': 126: The specified module could not be fou
nd. - C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/curb-0.8.5/lib/curb_core.so
(LoadError)
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `block in require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:236:in `load_dependency'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/curb-0.8.5/lib/curl.rb:
1:in `<top (required)>'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `block in require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:236:in `load_dependency'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/curb-0.8.5/lib/curb.rb:
1:in `<top (required)>'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `block in require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:236:in `load_dependency'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/li
b/active_support/dependencies.rb:251:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/feedzirra-0.0.24/lib/fe
edzirra.rb:4:in `<top (required)>'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:72:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:72:in `block (2 levels) in require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:70:in `each'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:70:in `block in require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:59:in `each'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er/runtime.rb:59:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundl
er.rb:132:in `require'
from C:/Workspace/combomeal/config/application.rb:7:in `<top (required)>
'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11/lib/rai
ls/commands.rb:53:in `require'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11/lib/rai
ls/commands.rb:53:in `block in <top (required)>'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11/lib/rai
ls/commands.rb:50:in `tap'
from C:/Rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11/lib/rai
ls/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
我也尝试重新启动,如Installing libCurl - ruby 1.9.3 .. rails 3.2.12 .. Windows所述,但它仍无法正常工作
答案 0 :(得分:1)
自安装libcurl以来,您是否重新启动了命令提示符?当我收到此错误时,是因为我在自己的提示符下运行rails server
命令,而我忘了刷新它。
一旦我关闭并重新打开提示,它就有效了。这可能就是为什么重启可以为其他人工作的原因。