Rails2.2.2 on the adapter to install mysql

Gem install mysql on Rails2.2.2

Environment: WindowsXP RadRails ruby1.8.2 rails2.2.2 mysql5.1.30

click google and found Rails2.2.2 database does not include the mysql adapter, needs its own installation.

The first attempt to directly run

gem install mysql

Agent has found a corporate network can not be remote installation, the local installation to find the corresponding gem has no library, but to then try again.

Then, try to install mysql's jdbc adapter.

Start up http://gems.rubyforge.vm.bytemark.co.uk/gems/ download

activerecord-jdbc-adapter-0.9.gem ,

jdbc-mysql-5.0.4.gem ,

activerecord-jdbcmysql-adapter-0.9.gem .

Run

gem install E:\study\Ruby_on_Rails\ruby-gems\activerecord-jdbcmysql-adapter-0.9.gem
gem install E:\study\Ruby_on_Rails\ruby-gems\activerecord-jdbc-adapter-0.9.gem
gem install E:\study\Ruby_on_Rails\ruby-gems\jdbc-mysql-5.0.4.gem

Installation information

> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ jdbc-mysql-5.0.4.gem
Successfully installed jdbc-mysql-5.0.4
1 gem installed
Installing ri documentation for jdbc-mysql-5.0.4 ...
Installing RDoc documentation for jdbc-mysql-5.0.4 ...
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ jdbc-mysql-5.0.4.gem
Successfully installed jdbc-mysql-5.0.4
1 gem installed
Installing ri documentation for jdbc-mysql-5.0.4 ...
Installing RDoc documentation for jdbc-mysql-5.0.4 ...
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ activerecord-jdbcmysql-adapter-0.9.gem
Successfully installed activerecord-jdbcmysql-adapter-0.9
1 gem installed
Installing ri documentation for activerecord-jdbcmysql-adapter-0.9 ...
Installing RDoc documentation for activerecord-jdbcmysql-adapter-0.9 ...

Run

rake db:migrate

Error Message

> rake db: migrate
(in E: / workspace / studyRails)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load - mysql

(See full trace by running task with - trace)
>

When prompted to open the trace, run

rake db:migrate --trace

> rake db: migrate - trace
rake db: migrate - trace
(in E: / workspace / studyRails)
** Invoke db: migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db: migrate
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load - jdbc-mysql-5.0.4/lib/jdbc/mysql.rb
C: / Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31: in `gem_original_require '
C: / Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31: in `require '
C: / Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb: 153: in `require '
C: / Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb: 521: in `new_constants_in '
C: / Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb: 153: in `require '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb: 64: in `mysql_connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 223: in `send '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 223: in `new_connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 245: in `checkout_new_connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 188: in `checkout '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 184: in `loop '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 184: in `checkout '
C: / Ruby/lib/ruby/1.8/monitor.rb: 242: in `synchronize '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 183: in `checkout '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 98: in `connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb: 326: in `retrieve_connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb: 121: in `retrieve_connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb: 113: in `connection '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb: 429: in `initialize '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb: 394: in `new '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb: 394: in `up '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb: 377: in `migrate '
C: / Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 111
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `call '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `each '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 578: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/1.8/monitor.rb: 242: in `synchronize '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 571: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 564: in `invoke '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2019: in `invoke_task '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `each '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2036: in `standard_exception_handling '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1991: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1970: in `run '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2036: in `standard_exception_handling '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1967: in `run '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake: 31
C: / Ruby / bin / rake: 19: in `load '
C: / Ruby / bin / rake: 19
>

Attention to this line

C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb: 64: in `mysql_connection '

Have relations with the mysql configuration, according to account and found that

# Require the MySQL driver and define Mysql::Result.all_hashes
      unless defined? Mysql
        begin
          require_library_or_gem('mysql')
        rescue LoadError
          $stderr.puts '!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.'
          raise
        end
      end
      MysqlCompat.define_all_hashes_method!

Over

require_library_or_gem('mysql')

Mysql.rb load failed.

Then, according to the mysql installation directory of the jdbc adapter mysql_adapter.rb modify the first 63 lines

require_library_or_gem('mysql')

Amended to read

require 'jdbc/mysql'

Continue to run

rake db:migrate --trace

Error information Mysql not loaded, this seems to reached a dead end. Open the C: \ Ruby \ lib \ ruby \ gems \ 1.8 \ gems \ jdbc-mysql-5.0.4 \ lib \ jdbc \ mysql.rb

module Jdbc
  module MySQL
    VERSION = "5.0.4"
  end
end
if RUBY_PLATFORM =~ /java/
  require "mysql-connector-java-#{Jdbc::MySQL::VERSION}-bin.jar"
else
  warn "jdbc-mysql is only for use with JRuby"
end

mysql the JDBC adapter in mysql.rb very easy, made it clear that

jdbc-mysql is only for use with JRuby

At this point I found myself on the wrong one to start, there is no clear environment parroting the installation database adapter. (This is also a common problem for some articles online, on account of some relevant things unclear, accidentally on the Road, a)

Then download from http://gems.rubyforge.vm.bytemark.co.uk/gems/ up a new mysql adapter

addressable-2.0.2.gem

extlib-0.9.10.gem
data_objects-0.9.11.gem
do_mysql-0.9.11.gem

Continue with the installation

gem install E:\study\Ruby_on_Rails\ruby-gems\addressable-2.0.2.gem
gem install E:\study\Ruby_on_Rails\ruby-gems\extlib-0.9.10.gem
gem install E:\study\Ruby_on_Rails\ruby-gems\data_objects-0.9.11.gem
gem install E:\study\Ruby_on_Rails\ruby-gems\do_mysql-0.9.11.gem

Error Message

> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem:
do_mysql requires data_objects (= 0.9.11, runtime)
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ data_objects-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing E: \ study \ Ruby_on_Rails \ ruby-gems \ data_objects-0.9.11.gem:
data_objects requires addressable (~> 2.0, runtime)
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ addressable-2.0.2.gem
Successfully installed addressable-2.0.2
1 gem installed
Installing ri documentation for addressable-2.0.2 ...
Installing RDoc documentation for addressable-2.0.2 ...
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ data_objects-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing E: \ study \ Ruby_on_Rails \ ruby-gems \ data_objects-0.9.11.gem:
data_objects requires extlib (~> 0.9.9, runtime)
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ extlib-0.9.10.gem

> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ extlib-0.9.10.gem

Successfully installed extlib-0.9.10
1 gem installed
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ data_objects-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Successfully installed data_objects-0.9.11
1 gem installed
Installing ri documentation for data_objects-0.9.11 ...
Installing RDoc documentation for data_objects-0.9.11 ...
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Building native extensions. This could take a while ...
ERROR: Error installing E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem:
ERROR: Failed to build gem native extension.

C: / Ruby / bin / ruby.exe extconf.rb install E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem
checking for mysql.h ... no
checking for main () in libmysql.lib ... no
checking for mysql_query () in mysql.h ... no
*** 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
- srcdir =.
- curdir
- ruby = C: / Ruby / bin / ruby
- with-mysql-dir
- without-mysql-dir
- with-mysql-include
- without-mysql-include = $ (mysql-dir) / include
- with-mysql-lib
- without-mysql-lib = $ (mysql-dir) / lib
- with-libmysqllib
- without-libmysqllib

Gem files will remain installed in C: / Ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.11 for inspection.
Results logged to C: / Ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.11/ext/do_mysql_ext/gem_make.out
> gem install E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
Building native extensions. This could take a while ...
ERROR: Error installing E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem:
ERROR: Failed to build gem native extension.

C: / Ruby / bin / ruby.exe extconf.rb install E: \ study \ Ruby_on_Rails \ ruby-gems \ do_mysql-0.9.11.gem
checking for mysql.h ... no
checking for main () in libmysql.lib ... no
checking for mysql_query () in mysql.h ... no
*** 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
- srcdir =.
- curdir
- ruby = C: / Ruby / bin / ruby
- with-mysql-dir
- without-mysql-dir
- with-mysql-include
- without-mysql-include = $ (mysql-dir) / include
- with-mysql-lib
- without-mysql-lib = $ (mysql-dir) / lib
- with-libmysqllib
- without-libmysqllib

Gem files will remain installed in C: / Ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.11 for inspection.
Results logged to C: / Ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.11/ext/do_mysql_ext/gem_make.out

Windows installed in the do-mysql a bit difficult.

No alternative but to put the computer to take home and continue to try first. This is a successful, but the output

> gem install mysql

Successfully installed mysql-2.7.3-x86-mswin32

1 gem installed

Installing ri documentation for mysql-2.7.3-x86-mswin32 ...

Installing RDoc documentation for mysql-2.7.3-x86-mswin32 ...

ERROR: While generating documentation for mysql-2.7.3-x86-mswin32

... MESSAGE: Unhandled special: Special: type = 17, text ="<!-- $ Id: README.html, v 1.20 2006-12-20 05:31:52 tommy Exp $ -> "

... RDOC args: - op C: / Ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-x86-mswin32/rdoc - exclude ext - main README - quiet ext README docs / ReadMe.html

(continuing with the rest of the installation)

This indicates that the library has been installed successfully, but failed to install rdoc does not affect use.

Continue to test

script/generate scaffold article title:string article:text

exists app / models /

exists app / controllers /

exists app / helpers /

create app / views / articles

exists app / views / layouts /

exists test / functional /

exists test / unit /

exists public / stylesheets /

create app / views / articles / index.html.erb

create app / views / articles / show.html.erb

create app / views / articles / new.html.erb

create app / views / articles / edit.html.erb

create app / views / layouts / articles.html.erb

create public / stylesheets / scaffold.css

create app / controllers / articles_controller.rb

create test / functional / articles_controller_test.rb

create app / helpers / articles_helper.rb

route map.resources: articles

dependency model

exists app / models /

exists test / unit /

exists test / fixtures /

create app / models / article.rb

create test / unit / article_test.rb

create test / fixtures / articles.yml

create db / migrate

create db/migrate/20090225144729_create_articles.rb

Have a corresponding skeleton, the

rake db:migrate

Error

> rake db: migrate

(in E: / workspace / studyRails)

rake aborted!

Mysql:: Error: Commands out of sync; you can't run this command now: SHOW TABLES

(See full trace by running task with - trace)

>

By

gem list --local

> gem list - local
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activerecord-jdbc-adapter (0.9)
activerecord-jdbcmysql-adapter (0.9)
activeresource (2.2.2)
activesupport (2.2.2)
addressable (2.0.2)
cgi_multipart_eof_fix (2.5.0)
data_objects (0.9.11)
extlib (0.9.10)
fxri (0.3.6)
fxruby (1.6.16)
gem_plugin (0.2.3)
hpricot (0.6.164)
jdbc-mysql (5.0.4)
linecache (0.43)
log4r (1.0.5)
mongrel (1.1.5)
mysql (2.7.3)
ptools (1.1.6)
rails (2.2.2)
rake (0.8.3, 0.8.1)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.2)
ruby-opengl (0.60.0)
test-unit (2.0.1)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)
>

Find mysql library version 2.7.3, are not to speculate with the mysql database version does not match the result?

Mysql query help documentation

Commands out of sync in client error

If you are in your client code to be Commands out of sync; You can't run this command now, you are in the wrong order of client function calls!

This may happen, for example, if you are using mysql_use_result() and you have to call the mysql_free_result() before trying to implement the new query. If you or mysql_use_result() between mysql_store_result() trying to return data on the implementation of two inquiries, it may also happen.

Through the trace tracking

rake db:migrate --trace

> rake db: migrate - trace
(in E: / workspace / studyRails)
** Invoke db: migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db: migrate
** Invoke db: schema: dump (first_time)
** Invoke environment
** Execute db: schema: dump
rake aborted!
Mysql:: Error: Commands out of sync; you can't run this command now: SHOW TABLES
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb: 188: in `log '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb: 309: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb: 414: in `tables'
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb: 61: in `tables'
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb: 23: in `dump '
C: / Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb: 17: in `dump '
C: / Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 246
C: / Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 245: in `open '
C: / Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 245
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `call '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `each '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 578: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/1.8/monitor.rb: 242: in `synchronize '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 571: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 564: in `invoke '
C: / Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake: 112
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `call '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 617: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `each '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 612: in `execute '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 578: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/1.8/monitor.rb: 242: in `synchronize '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 571: in `invoke_with_call_chain '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 564: in `invoke '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2019: in `invoke_task '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `each '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1997: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2036: in `standard_exception_handling '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1991: in `top_level '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1970: in `run '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 2036: in `standard_exception_handling '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb: 1967: in `run '
C: / Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake: 31
C: / Ruby / bin / rake: 19: in `load '
C: / Ruby / bin / rake: 19
>

Errors found at places mysql_adapter.rb: 414, code

    def tables(name = nil) #:nodoc:
        tables = []
        execute("SHOW TABLES", name).each { |field| tables << field[0] } #414 Line
        tables
      end

Why get this wrong? Guess is that mysql libraries do not match, put the previous% MYSQL_HOME% / bin libmySQL.dll available to the system under the Copy% RUBY_HOME% / bin directory, according to speculation, with InstantRails-2.0-win.zip under libmySQL.dll available to the system replacement, re-run db: migrate, really all ok.

Might well be described as full of twists and turns of its people!

分类:Ruby 时间:2009-03-21 人气:689
分享到:
blog comments powered by Disqus

相关文章

  • Rails 3 custom error message displayed next page 2010-07-08

    We all know that Rails would like displayed under a custom error page is modified rescue_action_in_public this method, as I also wrote a blog in Rails 2.X describes how to customize the error message page http://yangzhihuan.javaeye.com/ blog/577624 H

  • In Ruby on Rails Rake Tutorial (turn) 2010-10-09

    Original: Ruby on Rails Rake Tutorial (aka. How rake turned Me into an Alcoholic) Introduction: As a rails developer, you may be familiar with the rake for your test, or use rake db: migrate to run your migrations, but you really know Rake behind the

  • Ruby on rails tutorial in the classical Rake 2011-05-27

    Ruby on rails tutorial in the classical Rake Recently in combination with the rake svn to write a Daily build report. Our platforms are used most of the background job rake to achieve, to sum up, with the rake to write some of the background job has

  • "Ruby on Rails for Oracle Applications" Frequently Asked Questions 2010-02-16

    Directory Why RUBY ON RAILS? Definition What is Ruby? What is Rails? Model - View - Controller pattern (MVC) is what? RubyGems What is this? What is OCI8? ORACLE database connection To use the Oracle database to run Ruby on Rails, what needs to be in

  • At windowsxp install ruby on rails on the sqlite3-ruby problem-solving 2009-03-26

    This evening on the steps in accordance with the book step by step and completed the installation of ruby and rails, but at the time to do an example, by rake db: migrate error is always time, I think it was not installed sqlite3 called things a bit

  • Ruby on Rails install Windows records 2010-10-18

    Ruby on Rails install Windows records (Note: editing, not completed) 1. To understand what is Ruby on Rails Rails is a very well-known Web development framework, Rails and Ruby on Rails is the Ruby implementation. Ruby is an object-oriented scripting

  • Windows install Ruby on Rails Record (October 22 update on download gem to add) 2010-10-18

    Ruby on Rails install Windows records (Note: editing, not completed) 1. To understand what is Ruby on Rails Rails is a very well-known Web development framework, Rails and Ruby on Rails is the Ruby implementation. Ruby is an object-oriented scripting

  • Ruby on Rails Tutorial (Michael Hartl) Chinese translation of Chapter II demo (4) 2010-12-17

    (Connected to one of today's goal is to end ~ ~ refueling Chapter) 2.3 Microposts resources in the generation and exploration of the Users of resources, let us turn to look at another related resources - Microposts. In this section, I recommend two r

  • ruby on rails of HelloWord 2011-05-22

    As my colleagues strongly recommended, the company recently considered a number of small items from the Spring + ibatis + webx (mvc framework) developed into ruby ​​on rails development, so contact with the ruby ​​language and rails this framework, I

  • Web开发人员的利器:Ruby on Rails 2014-03-09

    工具发展简史 人类的发展就是工具的发展.从石器到木棒和矛,再到火器,我们学会了如何更有效地捕猎.从观看星像到指南针,再到海洋精密计时仪(marine chronometers)和全球定位系统(GPS),我们发现了如何更好地进行导航.从书信到电报,再到电话和互联网,我们将人类通讯的方式进行了革命.人类能够进行创新.我们能够发现解决问题的更有效的方法.我们能够创造更好的工具--这些工具对于我们所要解决的问题来说,显得更具有针对性和专门化,因而更为高效. 程序员也一样.优秀的程序员总是在寻找解决问题的

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.127 (s). 12 q(s)