views:

39

answers:

1

Hello everyone. This is my first question asked here so I apologize in advance if I break any rules.

I'm trying to get a project going on my system, I have imported the source code via GITHub, and are running it locally with WEBrick. When I do, the following error is printed:

=> Booting WEBrick => Rails 2.3.8 application starting on 0.0.0.0:3000 :29:in 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:inrequire' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in block in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_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:inrescue 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:inrequire' from :29:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inblock 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:inrequire' from 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:inrequire' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in block in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_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:inblock in tsk_require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:72:in block in check_requiring_thread' from <internal:prelude>:10:insynchronize' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:69:in check_requiring_thread' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:249:intsk_require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/database/connecting.rb:23:in adapter_class' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/database/connecting.rb:61:inconnect' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.15.0/lib/sequel/core.rb:119:in connect' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails_sequel-0.2.1/lib/rails_sequel/rails_sequel.rb:5:inconnect' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails_sequel-0.2.1/lib/rails_sequel.rb:8:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire' from :29:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inblock 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:inrequire' from 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:inblock in load_gems' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:307:in each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/initializer.rb:307:inload_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:inrun' from C:/Users/Soroush/AppData/Local/VirtualStore/Program Files/Git/foobar/projectxt/config/environment.rb:9:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire' from :29:in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inblock 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:inrequire' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/commands/server.rb:84:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:inrequire' from :29:in require' from script/server:3:in'


Prior to asking here I've googled on Sequel::AdapterNotFound, LoadError126, mysql_api.so but can't seem to get any valuable information.

I found this page: http://permalink.gmane.org/gmane.comp.lang.ruby.sequel/2645 Where a guy seems to have a similar problem, and someone replies and asks if running 'irb -rubygems -rmysql' brings up an error. I did that, and it gave me an error that said that LIBMYSQL.dll was missing on the computer. Not sure if this info is any useful, but thought I'd mention it here.

Anyone have a clue to a solution to the problem? Or a direction for me to look in?

Great thanks in advance to anyone who tries to help! Kind regards, Emil

A: 

The important part is here:

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

The error is being raised by the ruby mysql gem, which you confirmed by running that irb command. You probably need to add the LIBMYSQL.dll file to the computer, like it said.

Jeremy Evans
Thanks alot for the response Jeremy! I did have the libmySQL.dll file installed, although at the path of C:\Program Files\MySQL\MySQL Server 5.1\binI copied it to the path of C:\Ruby192\bin and voila - it worked.Again, thanks alot for your help!
Emil