Jellicle
Jellicle

Reputation: 30276

Segfault when I rake (Ruby on Rails)

EDIT: Here's the solution (in case the thread linked to below disappears):

  1. Install ruby 1.8.6 (down from 1.8.7)
  2. gem install rails -v=2.3.8 (same as before)
  3. gem install mysql (version 2.8.1, same as before)
  4. Download libmysql.dll from http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll and deposit it in Ruby186/bin. (Before, I had copied over the libmysql.dll file from Mysql/bin.)

When I attempt rake db:migrate with the database.yml file configured for mysql (not sqlite3) I get the following segfault error:

C:/Ruby187/lib/ruby/1.8/benchmark.rb:306: [BUG] Segmentation fault ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]

I have already looked at this thread: Ruby on Rails Rake Error and don't see any help there.*** It appears that my rails app is configured correctly because when I run rake db:create, rails successfully creates the mysql schema dictated for the development environment in database.yml (or returns a "schema already exists" message).

I'd guess I had mysql configured incorrectly, but the fact that rake db:create works on it makes me think otherwise. I have successfully set up rails and mysql (working together) on three other machines; I don't know what the problem is on this one.

Ruby v. 1.8.7 - Rails v. 2.3.8 - Mysql v. 5.1.54

***The user who posted that thread indicated that he solved the problem thanks to a post on aptana. The link to that post, however, points to the home page, so the answer thread appears to have either been moved or removed.

Upvotes: 1

Views: 1173

Answers (2)

David M
David M

Reputation: 51

I found that the last step, using the instantrails dll, solved my problem on Win 7 x64 without my having to change ruby or rails versions.

ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

rails -v
Rails 3.2.0

gem search mysql
mysql (2.8.1 x86-mingw32)

Upvotes: 1

Dave Sims
Dave Sims

Reputation: 5128

Does this describe the solution as well? http://rubyat.com/blog/2010/06/rails-2-3-8-segmentation-fault/

Upvotes: 2

Related Questions