Hello,
http://www.schmidp.com/2009/06/14/rubyrails-and-mysql-on-snow-leopard-10a380/comment-page-1/#comment-3751
I am searching for fix to problem, Russell F., Mike and Andrew. All
have the same problem.
root@br:/# gem install mysql
Building native extensions. This could take a while…
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
Installing RDoc documentation for mysql-2.8.1…
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
My email address is [email protected] please let me know fix.
I also problem but no fix at the following URL
http://forums.mysql.com/read.php?116,279110,279110
On Sep 2, 6:46 pm, Joao S. [email protected]
wrote:
Then i must edit the require line of my program
require “./mysql”
becomes
require “./mysql_api”
Thank you all.
First: do not top post.
Second: there is no error in the installation, but the generation of
documentation.
Third: cannot reproduce:
luis@seyori ~$ sudo gem install mysql --ri --rdoc
Building native extensions. This could take a while…
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…
Updating ri class cache with 2771 classes…
Installing RDoc documentation for mysql-2.8.1…
Forth: You’re trying to use a gem, and for that you need to require
‘rubygems’ prior using it:
require ‘rubygems’
require ‘mysql’
That works.
Manual copy of the file could introduce other issues in your
environment. Try avoid that.
I fix the problem.
gem install mysql
it says, “Successfully installed mysql-2.8.1”
so I do, updatedb
then i do, locate mysql-2.8.1
which gives me
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mysql_api.so
so I copy to my ruby program dir, cp
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mysql_api.so ./
Then i must edit the require line of my program
require “./mysql”
becomes
require “./mysql_api”
Thank you all.
Joao S. wrote:
Hello,
http://www.schmidp.com/2009/06/14/rubyrails-and-mysql-on-snow-leopard-10a380/comment-page-1/#comment-3751
I am searching for fix to problem, Russell F., Mike and Andrew. All
have the same problem.
root@br:/# gem install mysql
Building native extensions. This could take a while…
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
Installing RDoc documentation for mysql-2.8.1…
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
No definition for field_decimals
No definition for time_inspect
No definition for time_to_s
No definition for time_get_year
No definition for time_get_month
No definition for time_get_day
No definition for time_get_hour
No definition for time_get_minute
No definition for time_get_second
No definition for time_get_neg
No definition for time_get_second_part
No definition for time_set_year
No definition for time_set_month
No definition for time_set_day
No definition for time_set_hour
No definition for time_set_minute
No definition for time_set_second
No definition for time_set_neg
No definition for time_set_second_part
No definition for time_equal
No definition for error_errno
No definition for error_sqlstate
My email address is [email protected] please let me know fix.
I also problem but no fix at the following URL
http://forums.mysql.com/read.php?116,279110,279110
On Sep 3, 8:51 am, Peter M. [email protected] wrote:
irb(main):002:0> require ‘mysql’
petermarks [23:33] ~ which mysql
/usr/local/mysql/bin/mysql
petermarks [23:33] ~ file
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle: Mach-O
64-bit bundle x86_64
The problem is that you installed mysql extension using ruby
“setup.rb” instead of the gem.
Please remove the site_ruby mysql.bundle file and try installing the
gem
if you do “gem which mysql” you will see that the entry point (the
library) is mysql.rb, not mysql.bundle in mysql gem version 2.8.1
FWIW I am getting these messages in doc generation since I switched to
1.8.7 with the upgrade to SL. Don’t know if that explains it though,
just feedback.
I got the same error as Joao installing the mysql gem with the following
command:
sudo gem install mysql —
–with-mysql-config=/usr/local/mysql/bin/mysql_config
I get an error loading the gem though:
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘mysql’
LoadError: Failed to load
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle
from /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
from (irb):2
Mysql is running fine and seems to be installed correctly:
petermarks [23:33] ~ which mysql
/usr/local/mysql/bin/mysql
petermarks [23:33] ~ file
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/mysql.bundle: Mach-O
64-bit bundle x86_64
Luis L. wrote:
The problem is that you installed mysql extension using ruby
“setup.rb” instead of the gem.
Please remove the site_ruby mysql.bundle file and try installing the
gem
Thanks, this got me further along. I no longer get an error loading
‘mysql’ in irb after removing the site_ruby mysql.bundle file. However,
I get an error trying to load ‘mysql_api’:
irb(main):004:0> require ‘mysql_api’
LoadError: Failed to load
/Users/petermarks/.gem/ruby/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
from
/Users/petermarks/.gem/ruby/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require’
from (irb):4
Although I appear to have the correct version of the api bundle
installed:
petermarks [15:28] ~ file
/Users/petermarks/.gem/ruby/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle
/Users/petermarks/.gem/ruby/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle:
Mach-O 64-bit bundle x86_64
Has anyone had this?
I finally resolved this. It helps to have 64-bit ruby ![:slight_smile: :slight_smile:](/images/emoji/apple/slight_smile.png?v=6)
I was under the impression that snow leopard and/or xcode was supposed
to install 1.8.7, but I was somehow left with a 32-bit 1.8.6 install in
usr/local/bin. Strange.