problem installing on windows.

Added by Mike G over 8 years ago

I'm trying to install 2.3 under windows using ruby 1.9.3 (I want the ability to install on SQL Server as well as postGres/MySQL as I'm helping out porting a reporting tool that targets redmine). Anyways: I get all the way to the rake step and it fails. It says it can't find the mysql adapter at the specified location but the file is actually there.

The path it is looking for is: C:\Ruby193\lib\ruby\gems\1.9.1\gems\mysql2-0.3.11-x86-mingw32\lib\mysql2\1.9 which does contain the item it is complaining about. Other ruby functions work so the ruby path definitely is set in my mingwin/dos console. I tried both using bundle and using gem to manually install the mysql2 item. Any idea what I'm doing wrong? Note I have a tiny bit of experience with ruby packages in the past but am definitely a noobie to redmine.

mike@WINHACKER /c/wamp/www/redmine/v2.3/config (master)
$ gem install mysql2
Fetching: mysql2-0.3.11-x86-mingw32.gem (100%)

================================================================================ ======================

You've installed the binary version of mysql2.
It was built using MySQL Connector/C version 6.0.2.
It's recommended to use the exact same version to avoid potential issues.
At the time of building this gem, the necessary DLL files where available
in the following download:
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0
.2-win32.zip/from/pick
And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\
bin

================================================================================ ======================

Successfully installed mysql2-0.3.11-x86-mingw32
1 gem installed
Installing ri documentation for mysql2-0.3.11-x86-mingw32...
Installing RDoc documentation for mysql2-0.3.11-x86-mingw32...

$ rake generate_secret_token --trace
(in c:/wamp/www/redmine/v2.3)
rake aborted!
126: The specified module could not be found. - c:/Ruby193/lib/ruby/gems/1.9.1
/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so
c:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.
rb:2:in `require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.
rb:2:in `<top (required)>'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in
`require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in
`<top (required)>'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `
require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `
block (2 levels) in require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `
each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `
block in require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `
each'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `
require'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require
'
c:/wamp/www/redmine/v2.3/config/application.rb:7:in `<top (required)>'
c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
c:/wamp/www/redmine/v2.3/Rakefile:5:in `<top (required)>'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `l
oad'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `l
oad_rakefile'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:637:in `
raw_load_rakefile'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:94:in `b
lock in load_rakefile'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `
standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:93:in `l
oad_rakefile'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:77:in `b
lock in run'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `
standard_exception_handling'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:in `r
un'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>
'
c:/Ruby193/bin/rake:23:in `load'
c:/Ruby193/bin/rake:23:in `<main>'

mike@WINHACKER /c/wamp/www/redmine/v2.3/config (master)
$

Replies (1)

RE: problem installing on windows. - Added by Radhakrishna M over 8 years ago

Download Mysql-connector-c--c-noinstall-6.0.2-win32 from

http://dev.mysql.com/downloads/connector/c/

Extract it. Copy libmysql.dll file from /lib folder and Paste it in the C:\RailsInstaller\Ruby1.9.3\bin folder or
if you installed ruby and rails manually then paste it in the c:\Ruby1.9.3\bin folder

Install “mysql2” gem

gem install  mysql2

Delete your Gemfile.lock

bundle install

(1-1/1)