3

当我尝试使用 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>'

我也尝试过按照此处所述重新启动,安装 libCurl - ruby​​ 1.9.3 .. rails 3.2.12 .. Windows但它仍然无法正常工作

4

2 回答 2

1

Have you restarted your command prompt since installing libcurl? When I got this error, it was because I was running the rails server command in its own prompt, and I'd forgotten to refresh it.

Once I closed and re-opened the prompt, it worked. This is probably why rebooting worked for the other guy.

于 2014-04-27T03:31:27.297 回答
0

将您的 libcurl /bin 路径添加到您的 PATH

于 2015-09-08T15:22:01.073 回答