[RubyInstaller] entry point rb_str2cstr could not be located in msvcrt-ruby191.dll

106 views
Skip to first unread message

sapsford

unread,
May 21, 2010, 6:37:58 PM5/21/10
to RubyInstaller
Hi
I finally got ruby trunk 1.9.3 working by downloading the source
locally, using rubyinstaller, rake 191 LOCAL and removing all other
sources as described in a previous post.
Then rails app and rails server works but when I click on the index
page to get my application environment I get this error

entry point rb_str2cstr could not be located in msvcrt-ruby191.dll

is this dll out of date is there a new one for 1.9.3 or is this a
reflection of another error

Thanks
for your help
Regards
David

--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To post to this group, send email to rubyin...@googlegroups.com.
To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.

rogerdpack

unread,
May 21, 2010, 7:04:07 PM5/21/10
to RubyInstaller
> I finally got ruby trunk 1.9.3 working by downloading the source
> locally, using rubyinstaller, rake 191 LOCAL and removing all other
> sources as described in a previous post.
> Then rails app and rails server works but when I click on the index
> page to get my application environment I get this error
>
> entry point rb_str2cstr could not be located in msvcrt-ruby191.dll

I usually get things like this in gems when I upgrade my version of
ruby (msvcrt-ruby191.dll) to a newer version. Reinstall? Reinstall
gems?
Not sure, having never gotten exactly that one.

-rp

Luis Lavena

unread,
May 21, 2010, 7:08:21 PM5/21/10
to rubyin...@googlegroups.com
On Fri, May 21, 2010 at 7:37 PM, sapsford
<david.s...@addenbrookes.nhs.uk> wrote:
> Hi
> I finally got ruby trunk 1.9.3 working by downloading the source
> locally, using rubyinstaller, rake 191 LOCAL and removing all other
> sources as described in a previous post.
> Then rails app and rails server works but when I click on the index
> page to get my application environment I get this error
>
> entry point rb_str2cstr could not be located in msvcrt-ruby191.dll
>

What gem did you install?

> is this dll out of date is there a new one for 1.9.3 or is this a
> reflection of another error

the number reflected in the DLL is API compatibility, not Ruby version.

Will be good to know if was sqlite3-ruby, mysql-gem or mongrel?

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

sapsford

unread,
May 22, 2010, 2:25:01 AM5/22/10
to RubyInstaller
Hi
Thanks for your help
This was after "bundle install" which proceeded to install sqlite3-
ruby. How will I ascertain that this is the culprit?
Regards
David

On May 22, 12:08 am, Luis Lavena <luislav...@gmail.com> wrote:
> On Fri, May 21, 2010 at 7:37 PM, sapsford
>

rogerdpack

unread,
May 24, 2010, 6:10:03 PM5/24/10
to RubyInstaller
> Thanks for your help
> This was after "bundle install" which proceeded to install sqlite3-
> ruby.  How will I ascertain that this is the culprit?

I think opening up irb and doing
require 'sqlite3'
is enough to test it.
(which thing seems to work fine here)

ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

-rp

sapsford

unread,
May 25, 2010, 12:37:18 PM5/25/10
to RubyInstaller
Hi
require 'sqlite3' returns true

application now mentions driver for sqlite3 not found first line of
framework log reads

C:/Documents and Settings/sapsford/.bundle/ruby/1.9.1/gems/sqlite3-
ruby-1.2.5-x86-mingw32/lib/sqlite3/database.rb:627:in `load_driver'

another interesting point I have gem installed sqlite3-ruby however
using bundle install it will install sqlite3-ruby as if it is not
there
Gem list displays it as an installed gem and so does bundle show

performing bundle install again; it again will install sqlite3-ruby as
if it is not there

sqlite3.exe sqlite3.dll sqlite3.def are in my system32 directory I
have tried them in ruby/bin and my path has always pointed to them

running sqlite3.exe always works from anywhere in the directory
structure

For some reason sqlite3-ruby is being required but is failing to load
the driver producing

entry point rb_str2cstr could not be located in msvcrt-ruby191.dll

Is this entry point where sqlite3-ruby is accessing the driver?
getting a false / nil return and therefore assuming no driver found?
What string is being converted is it something to do with windows
directory access (from unix style)?

Regards
David

Luis Lavena

unread,
May 25, 2010, 12:55:08 PM5/25/10
to rubyin...@googlegroups.com
On Tue, May 25, 2010 at 1:37 PM, sapsford
<david.s...@addenbrookes.nhs.uk> wrote:
> Hi
> require 'sqlite3' returns true
>
> application now mentions driver for sqlite3 not found first line of
> framework log reads
>
> C:/Documents and Settings/sapsford/.bundle/ruby/1.9.1/gems/sqlite3-
> ruby-1.2.5-x86-mingw32/lib/sqlite3/database.rb:627:in `load_driver'
>

The problem might be the path with spaces.

Can you try installing sqlite3-ruby beta version?

http://rubygems.org/gems/sqlite3-ruby/versions/1.3.0.beta.2-x86-mingw32

Specify that in the Gemfile and also install normally, let's see if
that works better.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

sapsford

unread,
May 25, 2010, 1:51:26 PM5/25/10
to RubyInstaller
Hi
SUCCESS
but only with bundle install get full app description ruby 1.9.3 etc

gem install gave same error

Now problem with simple app get to rake db:migrate and I get this

C:/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/site_ruby/1.9.1/
rubygems.rb:335:in `bin_path': can't find executable rake for
rake-0.8.7 (Gem::Exception)
from <internal:gem_prelude>:282:in `method_missing'
from C:/rubyinstaller/sandbox/ruby19_mingw/bin/rake:19:in
`<main>'


Now I seem to remember prelude not compiling correctly along with
ffi.h. I will try another compile and try and catch the prelude
message

Thanks once again

Regards
David


On May 25, 5:55 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Tue, May 25, 2010 at 1:37 PM, sapsford
>

Luis Lavena

unread,
May 25, 2010, 2:05:36 PM5/25/10
to rubyin...@googlegroups.com
On Tue, May 25, 2010 at 2:51 PM, sapsford
<david.s...@addenbrookes.nhs.uk> wrote:
> Hi
> SUCCESS
> but only with bundle install get full app description ruby 1.9.3 etc
>

Sorry? I'm not following you on this.

Are you trying to use ruby 1.9.3 (trunk) against bundler, rails and everything?

I would recommend not, since you're talking on unknown territory.

> gem install gave same error
>

Please provide full information of the errors, "same error" do not help.

gem install sqlite3-ruby --debug -V

Gist or pastie of the output

irb output of this:

require 'rubygems'
require 'sqlite3'

> Now problem with simple app get to rake db:migrate and I get this
>
> C:/rubyinstaller/sandbox/ruby19_mingw/lib/ruby/site_ruby/1.9.1/
> rubygems.rb:335:in `bin_path': can't find executable rake for
> rake-0.8.7 (Gem::Exception)
>        from <internal:gem_prelude>:282:in `method_missing'
>        from C:/rubyinstaller/sandbox/ruby19_mingw/bin/rake:19:in
> `<main>'
>

You need rake, simply bundler is not finding it.

> Now I seem to remember prelude not compiling correctly along with
> ffi.h.  I will try another compile and try and catch the prelude
> message
>

I think you're mixing problems. Why not step back for a second, tell
us what you want to achieve and maybe better we can work together in
alternate solutions than the ones you're exploring.

rogerdpack

unread,
Jun 2, 2010, 12:30:12 PM6/2/10
to RubyInstaller
> entry point rb_str2cstr could not be located in msvcrt-ruby191.dll
>
> is this dll out of date is there a new one for 1.9.3 or is this a
> reflection of another error

I got this too using 1.9.3 with rails3 and the sqlite3-ruby (1.2.5 x86-
mingw32) gem (click on "About your application’s environment")

Updating to 1.3.0 pre seemed to fix the problem.

-rp

Luis Lavena

unread,
Jun 2, 2010, 12:36:55 PM6/2/10
to rubyin...@googlegroups.com

Then 1.9.3 is API incompatible with 1.9.1, used to create the extension.

sqlite3-ruby 1.3.0 will hit final this weekend.

deepj

unread,
Jun 2, 2010, 8:21:15 PM6/2/10
to rubyin...@googlegroups.com
I have a different problem with Ruby 1.9.2-preview3 and sqlite3-ruby
1.3.0-beta2.

c:\dev\rails3>rails server
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
`require': no such file to load -- sqlite3/sqlite3_native (LoadError)
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
`rescue in <top (required)>'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:2:in
`<top (required)>'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:43:in
`require'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:43:in
`block (2 levels) in require'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:41:in
`each'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:41:in
`block in require'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:40:in
`each'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler/runtime.rb:40:in
`require'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/bundler-0.9.25/lib/bundler.rb:89:in
`gem_require'
from c:/dev/rails3/config/application.rb:7:in `<top (required)>'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta3/lib/rails/commands.rb:39:in
`require'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta3/lib/rails/commands.rb:39:in
`<top (required)>'
from script/rails:9:in `require'
from script/rails:9:in `<main>'

c:\dev\rails3>gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.beta3)
actionpack (3.0.0.beta3)
activemodel (3.0.0.beta3)
activerecord (3.0.0.beta3)
activeresource (3.0.0.beta3)
activesupport (3.0.0.beta3)
arel (0.3.3)
builder (2.1.2)
bundler (0.9.25)
erubis (2.6.5)
haml (3.0.9)
i18n (0.3.7)
mail (2.2.1)
memcache-client (1.8.3)
mime-types (1.16)
minitest (1.6.0)
polyglot (0.3.1)
rack (1.1.0)
rack-mount (0.6.3)
rack-test (0.5.4)
rails (3.0.0.beta3)
railties (3.0.0.beta3)
rake (0.8.7)
rdoc (2.5.8)
sqlite3-ruby (1.3.0.beta.2 x86-mingw32)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.13.6)
treetop (1.4.8)
tzinfo (0.3.22)

Dne 2.6.2010 18:36, Luis Lavena napsal(a):

Luis Lavena

unread,
Jun 3, 2010, 11:19:58 PM6/3/10
to rubyin...@googlegroups.com
On Wed, Jun 2, 2010 at 8:21 PM, deepj <deepjun...@gmail.com> wrote:
> I have a different problem with Ruby 1.9.2-preview3 and sqlite3-ruby
> 1.3.0-beta2.
>
> c:\dev\rails3>rails server
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
> `require': no such file to load -- sqlite3/sqlite3_native (LoadError)
>        from

can you try calling out the gem *without* bundler?

irb

require 'rubygems'
require 'sqlite3'

Thank you.

deepj

unread,
Jun 4, 2010, 6:33:15 PM6/4/10
to rubyin...@googlegroups.com
The same problem
c:\>pik 192

c:\>irb
irb(main):001:0> require 'sqlite3'
LoadError: no such file to load -- sqlite3/sqlite3_native
from

c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
`require'

from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
`rescue in <top (required)>'
from
c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:2:in
`<top (required)>'

from (irb):1:in `require'
from (irb):1
from c:/ruby/ruby-1.9.2/bin/irb:12:in `<main>'
irb(main):002:0>


Dne 4.6.2010 5:19, Luis Lavena napsal(a):

Luis Lavena

unread,
Jun 7, 2010, 9:15:30 AM6/7/10
to rubyin...@googlegroups.com
On Fri, Jun 4, 2010 at 6:33 PM, deepj <deepjun...@gmail.com> wrote:
> The same problem
> c:\>pik 192
>
> c:\>irb
> irb(main):001:0> require 'sqlite3'
> LoadError: no such file to load -- sqlite3/sqlite3_native
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
> `require'
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
> `rescue in <top (required)>'
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:2:in
> `<top (required)>'
>        from (irb):1:in `require'
>        from (irb):1
>        from c:/ruby/ruby-1.9.2/bin/irb:12:in `<main>'
> irb(main):002:0>
>

Ok, posting under this thread ("entry point rb_str2cstr could not be
located in msvcrt-ruby191.dll") makes me assume you're getting that
error first and then the issue about loading, correct?

If that is the case, then we have serious problems with 1.9.2-preview3
that are beyond RubyInstaller.

I'm going try to setup -preview3 as cross compiler today and see if I
can build new binaries.

Please, if the error is something else, start a new thread -- I'm
starting to get confused by so many emails with so many different
things.

rogerdpack

unread,
Jun 7, 2010, 4:21:39 PM6/7/10
to RubyInstaller
> irb(main):001:0> require 'sqlite3'
> LoadError: no such file to load -- sqlite3/sqlite3_native
>          from

Does that file (sqlite3_native.so) exist?
I guess that that message sometimes means that some dependency is not
found, though the file exists, so could be legit. Have you made sure
sqlite3.dll is in your path?
-rp

rogerdpack

unread,
Jun 7, 2010, 4:40:25 PM6/7/10
to RubyInstaller
> > c:\>irb
> > irb(main):001:0> require 'sqlite3'
> > LoadError: no such file to load -- sqlite3/sqlite3_native

Works here for me with 1.9.2 and 1.9.3

C:\installs\ruby_1_9_2_installed\bin>gem install sqlite3-ruby
Successfully installed sqlite3-ruby-1.3.0-x86-mingw32
1 gem installed

C:\installs\ruby_1_9_2_installed\bin>irb
irb(main):001:0> require 'sqlite3'
=> true
irb(main):002:0> exit

C:\installs\ruby_1_9_2_installed\bin>ruby -v
ruby 1.9.2dev (2010-06-06 revision 28191) [i386-mingw32]

Luis Lavena

unread,
Jun 7, 2010, 6:52:48 PM6/7/10
to rubyin...@googlegroups.com
On Fri, Jun 4, 2010 at 6:33 PM, deepj <deepjun...@gmail.com> wrote:
> The same problem
> c:\>pik 192
>
> c:\>irb
> irb(main):001:0> require 'sqlite3'
> LoadError: no such file to load -- sqlite3/sqlite3_native
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
> `require'
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:6:in
> `rescue in <top (required)>'
>        from
> c:/ruby/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.0.beta.2-x86-mingw32/lib/sqlite3.rb:2:in
> `<top (required)>'
>        from (irb):1:in `require'
>        from (irb):1
>        from c:/ruby/ruby-1.9.2/bin/irb:12:in `<main>'
> irb(main):002:0>
>

Cannot reproduce. Downloaded and compiled preview3 in the train:

C:\Users\Luis>pik 192

C:\Users\Luis>ruby -v
ruby 1.9.2dev (2010-05-31) [i386-mingw32]

C:\Users\Luis>irb
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'sqlite3'
=> true
irb(main):003:0> $LOADED_FEATURES.find_all { |f| f =~ /native/ }
=> ["C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/sqlite3-ruby-1.3.0-x86-mingw32/lib/sqlite3/1.9/sqlite3_native.so"]
irb(main):004:0>

deepj

unread,
Jun 8, 2010, 9:47:03 PM6/8/10
to rubyin...@googlegroups.com
It works for you due to having SQLite library somewhere in your PATH. I
added SQLite library to PATH and everything works now.

Dne 8.6.2010 0:52, Luis Lavena napsal(a):

Luis Lavena

unread,
Jun 8, 2010, 10:40:11 PM6/8/10
to rubyin...@googlegroups.com
On Tue, Jun 8, 2010 at 9:47 PM, deepj <deepjun...@gmail.com> wrote:
> It works for you due to having SQLite library somewhere in your PATH. I
> added SQLite library to PATH and everything works now.
>

Hmn, yes, I thought that was pretty much known: you need sqlite3 dll
somewhere in the PATH:

http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-sqlite3/

Reply all
Reply to author
Forward
0 new messages