Rails2.2.2 on the adapter to install mysql
Advertisements
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
,
,
.
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
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!
Related Posts of Rails2.2.2 on the adapter to install mysql
-
Answer: After 2.2 upgrade mysql question-driven
windows installed after the mysql gem error, error is approximately: ArgumentError (NULL pointer given): (eval): 3: in `each_hash ' (eval): 3: in `all_hashes' This is feeling under the windows of the question if the mysql gem version libmysql ...
-
ROR resources
Ruby Web site resources: ruby official website: http://www.ruby-lang.org ruby doc official website: http://www.ruby-doc.org rubyonrails official website: http://www.rubyonrails.org programming ruby online edition (Ruby studying the "Bible") ...
-
JPA data source data source to configure Tomcat conversion essay questions
To the JPA in the use of the development process, sometimes used in the data source conversion problem, The following methods are only my personal experience of a situation and its solutions, if different, please everyone posted for your reference encount
-
Hibernate II Study Notes
11. Many-to-many Of many that can be converted to two one-to-many <set name="students" table="teacher_student"> <key column="techer_id"/> <many-to-many column="student_id"/> </set> many-to-many data only from one end of the mainten
-
Rails command
In windowsxp install ruby on rails of sqlite3-ruby problem-solving nmake 'nmake' is not recognized as an internal or external command,
-
Use Ext JS to read the JsonReader complex object json
Today was how to resolve the following complex json object to the difficult living over a long time .. did not find documentation how to read JsonReader Ways json object (possibly also because of their limited level of E the text did not correctly underst
-
NoClassDefFoundError: javax / servlet / Servlet
In the project in order to achieve a listener in web.xml set up a listener, did start in Tomcat actually occurred after java.lang.NoClassDefFoundError: javax / servlet / ServletContextListener this anomaly google and found the reasons for the lack of serv
-
RoR explained
ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th
-
Ruby on Rails Routing - Simple Examples
This article contains a list of ruby on rails routing examples. If you find you have any questions please leave a comment. Routes are processed from the top of routes.rb down. If a route is matched it will stop processing the routes.rb file and use that r
-
Hibernate.cfg.xml configuration file (including the primary key generation strategy Introduction)
Hibernate.cfg.xml configuration file: <? xml version = "1.0" encoding = "utf-8"?> <! DOCTYPE hibernate-configuration PUBLIC "- / / Hibernate / Hibernate Configuration DTD / / EN" "hibernate-configuration-2.0.dtd












