2010-10-01 69 views
0

這是我在這裏問的第一個問題,所以如果我違反任何規則,我會提前道歉。Sequel :: AdapterNotFound試圖運行Ruby On Rails應用程序

我試圖讓我的系統上運行一個項目,我通過GITHub導入了源代碼,並使用WEBrick在本地運行它。當我做,則打印以下錯誤:

=>引導的WEBrick =>的Rails 2.3.8應用開始於0.0.0.0:3000 :29:在require': LoadError: 126: Det går inte att hitta den angivna modulen(*Translation: Cannot find the given module*.) - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (Sequel::AdapterNotFound) from <internal:lib/rubygems/custom_require>:29:in需要」 從C:/ Ruby192/LIB/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:在block in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport -2.3.8/lib/active_support/dependencies.rb:156:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:7:in rescue in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib /mysql.rb:2:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in要求' 從:29:在require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in塊中要求' 從C :/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:new_constants_in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in需要C:/Ruby192/lib/ruby/gems/1.9中的' .1/gems/sequel-3.15.0/lib/sequel/adapters/mysql.rb:4:in rescue in <top (required)>' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/adapters/mysql.rb:1:in' from:29:in require' from <internal:lib/rubygems/custom_require>:29:in require C:/Ruby192/lib/ruby/gems/1.9' 。 1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:在block in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib /active_support/dependencies.rb:156:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:249:in block in tsk_require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:72:在block in check_requiring_thread' from <internal:prelude>:10:in中同步來自C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb的' :69:check_requiring_thread' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:249:in tsk_require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/database/connecting.rb:23:在adapter_class' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/database/connecting.rb:61:in連接' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:119:在connect' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails_sequel-0.2.1/lib/rails_sequel/rails_sequel.rb:5:in連接' 從C:/ Ruby192/lib/ruby​​/gems/1.9.1/gems/rails_sequel-0.2.1/lib/rails_sequel.rb:8:在<top (required)>' from <internal:lib/rubygems/custom_require>:29:in中要求' :29:在require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in塊中要求' 從C:/Ruby192/lib/ruby/gems/1.9。 1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:new_constants_in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in需要C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib中的' /rails/gem_dependency.rb:215:in load' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:307:in block in load_gems' from C :/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:307:在each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:307:in load_gems' from C:/Ruby192/lib/ruby/gems/1.9.1 /gems/rails-2.3.8/lib/initializer.rb:164:in process' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:113:in從C:/ Users/Soroush/AppData/Local/VirtualStore/Program Files/Git/foobar/projectxt/config/environment.rb運行' :9:在<top (required)>' from <internal:lib/rubygems/custom_require>:29:in中要求' :29:在require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in中要求' 中的塊來自C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb :521:new_constants_in' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in要求' 來自C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/commands/server.rb:84:在<top (required)>' from <internal:lib/rubygems/custom_require>:29:in要求' 從:29 :require' from script/server:3:in'


在問這裏之前,我已經在Sequel :: AdapterNotFound,LoadError126,mysql_api.so上搜索了一下,但似乎無法獲得任何有價值的信息。

我找到了這個網頁:http://permalink.gmane.org/gmane.comp.lang.ruby.sequel/2645 當一個傢伙似乎也有類似的問題,有人回覆,並詢問是否運行「IRB -rubygems -rmysql」帶來了一個錯誤。我這樣做,它給了我一個錯誤,說在電腦上缺少LIBMYSQL.dll。不知道這個信息是否有用,但我想在這裏提到它。

任何人都有解決問題的線索?或者我想找一個方向?

非常感謝任何人試圖幫助! 親切的問候,周華健

回答

0

的重要組成部分,是在這裏:

LoadError: 126: Det går inte att hitta den angivna modulen(*Translation: Cannot find the given module*.) - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so 

該錯誤是由紅寶石mysql的寶石,您可以通過運行IRB命令證實提高。就像它說的那樣,您可能需要將LIBMYSQL.dll文件添加到計算機中。

+0

非常感謝Jeremy! 雖然位於C:\ Program Files \ MySQL \ MySQL Server 5.1 \ bin 的路徑中,但我已經安裝了libmySQL.dll文件,我將它複製到C:\ Ruby192 \ bin和voila的路徑 - 它工作正常。 再次,非常感謝您的幫助! – 2010-10-02 12:35:52