Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2011-02-09 17:17
Hi David,

A fix for this problem is been delivered in version 2.5.6 of ibm_db gem that is released today. Kindly use the new gem for your porting and let us know how it goes.

Also note, now you will not have to worry of selecting the gem manually from rubyforge and then perform a local install. The gem install command will automatically resolve the specifics and install the right gem for you.

Thanks

Praveen

By: David Adler
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-11-03 10:52
Hi Praveen,

I've decided to stay with Rails 2.3.5 and Ruby 1.8.6. Hopefully the ibm_db issues with Ruby & Rails will get sorted out eventually and I will try again.

David

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-11-03 06:54
Hi David,

Were you able to solve it. I am out of luck, did not get response from any of the forums. Bundler or the Rails forum.

http://groups.google.com/group/ruby-bundler/browse_thread/thread/9dc0b763cfa3568a

Tried on the Ruby installer forum too with no results.

Thanks

Praveen

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-21 10:53
Hi David,

I have raised a ticket in the Rails tracker on this issue. Let us see if we could get some help from there.

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5846-vendor-supplied-database-adpaters-are-not-loaded-by-rails-3-on-windows

Kindly give a +1 or put in comments showing the severity so that this will be looked into asap.

Thanks

Praveen

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-19 10:28
Hi David,

This is interesting. I was able to repro the problem. Not sure why it says it cannot load the file although the ibm_db gem is installed.

I tried requiring the file (require 'active_record/connection_adapters/ibm_db_adapter') from irb and it is seen working fine.

Also, this problem is seen only on Windows. Might be it is got something to do with the packaging or so.

Will keep you updated as and when I progress on findings. Let me know if you find something.

@Others: Did anybody face the same problem and if you solved could you let us know what we are missing.


Thanks

Praveen

By: David Adler
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-18 17:37
This is what I get from 'gem list':
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (3.0.1)
activemodel (3.0.1)
activerecord (3.0.1)
activeresource (3.0.1)
activesupport (3.0.1)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.2)
erubis (2.6.6)
i18n (0.4.1)
ibm_db (2.5.5 mswin32)
mail (2.2.7)
mime-types (1.16)
minitest (1.6.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.1)
railties (3.0.1)
rake (0.8.7)
rdoc (2.5.8)
sqlite3-ruby (1.3.1 x86-mingw32)
thor (0.14.3)
treetop (1.4.8)
tzinfo (0.3.23)

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-18 17:13
Hi David,

Do you see ibm_db listed when issued gem list?, if not you will need to check if you installed on to correct ruby installation (in case there are multiple ruby on your machine).

What is the significance of mswin32 vs mingw32?

mswin32 ruby is VC compiled and mingw32 is MinGW compiled ruby version. Respectively RUBY_PLATFORM will be mswin32 or mingw32.

Mingw ruby is know to be quite faster than mswin32 one and carries some advantages with it.

Currently ibm_db ships default for the mswin32 platform and hence you were seeing the error. Work towards making this shift (from mswin32 to mingw) is on and you would asap see ibm_db shipping default for mingw.

Thanks

Praveen

By: David Adler
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-18 14:03
The gem installed ok after downloading - why does this problem occur.

Now when trying to run
'rails generate scaffold Address name: string'
I get:
d:/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection': Please install the ibm_db adapter: `gem install activerecord-ibm_db-adapter` (no such file to load -- active_record/connection_adapters/ibm_db_adapter) (RuntimeError)

What is the significance of mswin32 vs mingw32?

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-18 12:43
David,

Download the gem on to your local drive and issue gem install pointing to the downloaded gem. You should be able to successfully install the gem

Eg:

1) Download the gem from http://rubyforge.org/frs/download.php/71668/ibm_db-2.5.5-mswin32-rb191.gem to location say C:\downloads

2) C:\> cd C:\downloads

3) C:\downloads> gem install ibm_db-2.5.5-mswin32-rb191.gem

Let me know if you are still facing difficulty.

Thanks

Praveen

By: David Adler
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-18 12:17
I read the other thread but it didn't conclude with success.

My environment is Win32.

I set
IBM_DB_DIR=d:\sqllib
IBM_DB_LIB=d:\sqllib\lib
IBM_DB_INCLUDE=d:\sqllib\include

The ruby version is
ruby 1.9.2.p0 (2010-08-18) [i386-mingw32]

This is the contents of the mkmf.log:
"gcc -o conftest -Id:/ruby/include/ruby-1.9.1/i386-mingw32 -Id:/ruby/include/ruby-1.9.1/ruby/backward -Id:/ruby/include/ruby-1.9.1 -I. -Id:\sqllib\include -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long conftest.c -L. -Ld:/ruby/lib -Ld:\sqllib\lib -L. -lmsvcrt-ruby191-static -lshell32 -lws2_32 "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main() {return 0;}
/* end */

There is no "gcc" on this Windows system (or another C compiler)

By: Praveen Devarao
RE: ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-17 15:22
Hi David,

Check this thread http://rubyforge.org/forum/forum.php?thread_id=48521&forum_id=9503 You are seeing the same issue.

Thanks

Praveen

By: David Adler
ibm_db install fails with ruby 1.9.2 [ reply ]  
2010-10-15 19:03
when I run 'gem install ibm_db' it is failing with the messages below. Do I need to have a C compiler installed in order to install this?

d:/ruby/bin/ruby.exe extconf.rb
creating gil_release_version
creating unicode_support_version
checking for SQLConnect() in -ldb2... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=d:/ruby/bin/ruby
--with-IBM_DB-dir
--without-IBM_DB-dir
--with-IBM_DB-include
--without-IBM_DB-include=${IBM_DB-dir}/include
--with-IBM_DB-lib
--without-IBM_DB-lib=${IBM_DB-dir}/lib
--with-db2lib
--without-db2lib
d:/ruby/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:748:in `block in have_library'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from d:/ruby/lib/ruby/1.9.1/mkmf.rb:743:in `have_library'
from extconf.rb:31:in `<main>'