2015-06-06 35 views
-2

我有麻煩,在Rails項目(redmine2.3),導軌的版本是3.2無法加載EventMachine C擴展;要使用純Ruby反應器

啓動項目

bundle exec thin start -p 8080 -e production -s 5 -d 

錯誤信息

(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here 
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here 
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' 
/var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:8:in `require': libruby.so.2.0: cannot open shared object file: No such file or directory - /var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/rubyeventmachine.so (LoadError) 
    from /var/wtn/vendor/cache/ruby/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:8:in `<top (required)>' 
    from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:7:in `require' 
    from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/lib/thin.rb:7:in `<top (required)>' 
    from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/bin/thin:5:in `require' 
    from /var/wtn/vendor/cache/ruby/2.0.0/gems/thin-1.6.2/bin/thin:5:in `<top (required)>' 
    from /var/wtn/vendor/cache/ruby/2.0.0/bin/thin:23:in `load' 
    from /var/wtn/vendor/cache/ruby/2.0.0/bin/thin:23:in `<main>' 

運行時發生同樣的錯誤rails -v

rails -v 
(eval):9: warning: already initialized constant Bundler::Dsl::RAILS_VERSION_IS_3 
(eval):9: warning: previous definition of RAILS_VERSION_IS_3 was here 

在項目運行bundle exec .....產生同樣的錯誤

問題已經解決了,看到我的評論在三樓,有答案

+0

可能重複[Rails - 無法運行應用程序:無法加載EventMachine C擴展;](http://stackoverflow.com/questions/14824235/rails-cannot-run-app-unable-to-load-the -eventmachine -c-extension) – jvnill

+0

不一樣,看到我在第三層的評論,有回答 – colin

回答

2

此相關的錯誤信息如下:

Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby' 

嘗試重新安裝eventmachine寶石:

gem uninstall eventmachine 
bundle install 

Rails/Ruby Error When Creating Database: Unable to load the EventMachine C extensionRails - cannot run app: Unable to load the EventMachine C extension;有關如何處理此問題的更多建議。

+0

怎麼樣的警告:(eval):9:警告:已經初始化常量Bundler :: Dsl :: RAILS_VERSION_IS_3 ( eval):9:警告:RAILS_VERSION_IS_3的先前定義在這裏 – colin

+0

寶石卸載eventmachine似乎沒有任何提示返回 – colin

+0

我做到了,但沒有工作。 – colin