当我运行foreman start时,会出现以下错误:

 ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require': incompatible library version - ~/.rvm/gems/ruby-2.2.3/gems/rgeo-0.4.0/lib/rgeo/coord_sys/proj4_c_impl.bundle (fatal)
        from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
        from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
        from ~/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
        from ~/.rvm/gems/ruby-2.2.3/gems/rgeo-0.4.0/lib/rgeo/coord_sys.rb:39:in `<top (required)>'

我已经试过了,rvm gemset empty && bundle install,在同一个项目中工作的其他人没有这个问题。
gem uninstall rgeo && gem install rgeoRuby 2.2.3p173Rails 4.2.4
我做错什么了?

最佳答案

我也遇到了这个问题。我需要更多地了解您的环境,但这可能与我今天向rgeo项目报告的这个问题有关:https://github.com/rgeo/rgeo/issues/114
如果您使用的是自制版本的ruby,则可能需要卸载它并使用rvm。当你们两个都跑的时候似乎有冲突。
我还承诺了一个可能对你有用的补丁。它基本上确保了如果您使用的是ruby管理器,rgeo会首先尝试使用这些库进行构建。你可以在这里看到代码:https://github.com/eddietejeda/rgeo/tree/prioritize_ruby_manager_lib
您可以将此添加到gemfile中进行测试:
gem 'rgeo', :git => '[email protected]:eddietejeda/rgeo.git', :branch => 'prioritize_ruby_manager_lib'
希望这有帮助!

10-01 10:16