Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails msvcrt-ruby191.dll problems on XP

I am trying to run Rails3 on XP Profesoinal and following the tutorial here http://railstutorial.org and am receiving the following errors all the time, even trying to return static pages. The message is the procedure entry point rb_str2cstr could not be located in the dynamic link library msvcrt-ruby191.dll

Also, the page gives a runtime error "no driver for sqlite3 found" even though i haven't created any models yet. The sqlite3.exe, sqlite3.dll and sqlite3.def are all in the bin folder and I have run Gem install sqlite3-ruby.

I have also tried gem install mongrel --pre and the instructions given http://www.ruby-forum.com/topic/202770#882858, but nothing is working

error message

like image 653
user10479 Avatar asked Jul 24 '26 07:07

user10479


2 Answers

Here is my minimal fix for the problem:

ruby -v => 1.9.2p0 
rails -v => 3.0.0 
gem -v => 1.3.7
  1. download sqlitedll-3_7_3.zip from http://sqlite.org/download.html
  2. copy sqlite3.def and sqlite3.dll to ruby/bin
  3. edit Gemfile:

    gem 'sqlite3-ruby', '1.3.1', :require => 'sqlite3'

  4. del Gemfile.lock

  5. bundle install
  6. rake db:migrate
like image 109
Alexey Avatar answered Jul 25 '26 22:07

Alexey


Ruby 1.9.2, Rails 3.0

rake db:migrate produces the error message:

The procedure entry point rb_str2cstr could not be located in the dynamic link library msvcrt-ruby191.dll

Resolved by the following:

  1. Delete gemlock.
  2. Change SQLite version to 1.3.1.
  3. Run: bundle install.

rake db:migrate now produces the correct results.

like image 35
Dave Thomas Avatar answered Jul 25 '26 21:07

Dave Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!