2010-10-01 70 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