Forum: Ruby on Rails mysql error on server

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
63dad916bb5ab303368514e7b7aae46a?d=identicon&s=25 jabauer (Guest)
on 2009-01-06 16:36
(Received via mailing list)
I just updated to Rails 2.2.2 from 1.2.6 yesterday.  Today I
reinstalled the  mysql gem.  Now when I try to run script/server the
server starts, but when I try to access my database in a browser
window get the following error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
  Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
  Expected in: dynamic lookup

Trace/BPT trap

Any suggestions would be most appreciated.

Thanks!
79412f7f61ac11b267bc664768069575?d=identicon&s=25 Rodrigo Bammann (rodrigoundead)
on 2009-01-14 19:10
jabauer wrote:
> I just updated to Rails 2.2.2 from 1.2.6 yesterday.  Today I
> reinstalled the  mysql gem.  Now when I try to run script/server the
> server starts, but when I try to access my database in a browser
> window get the following error:
>
> dyld: lazy symbol binding failed: Symbol not found: _mysql_init
>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
> mysql.bundle
>   Expected in: dynamic lookup
>
> dyld: Symbol not found: _mysql_init
>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
> mysql.bundle
>   Expected in: dynamic lookup
>
> Trace/BPT trap
>
> Any suggestions would be most appreciated.
>
> Thanks!

probably its version of mysql not this correct one

uninstall mysql following these steps:

1.   Open Terminal
2.   sudo nano /etc/hostconfig
3.   Delete the following line: "MYSQLCOM=-YES-"
4.   CTRL+x
5.   y
6.   CTRL+m
7.   Make sure MySQL is not running
8.   Open Terminal
9.   sudo rm /usr/local/mysql
10. sudo rm -rf /usr/local/mysql *
11. sudo rm -rf /Library/StartupItems/MySQLCOM
12. sudo rm -rf /Library/PreferencePanes/My*
13. sudo rm -rf /Library/Receipts/mysql*
14. sudo rm -rf /Library/Receipts/MySQL*


installs the correct version, probably x386 or 32bits:
http://dev.mysql.com/downloads/mysql/5.1.html#downloads.


Open Terminal

sudo env ARCHFLAGS="-arch i386" gem install mysql --
--wuth-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib
--with-mysql-include=/usr/local/mysql/include \
--with-mysql-config=/usr/local/mysql/bin/mysql_config
46316e02bd9cd47578847ca665019139?d=identicon&s=25 Scott Bratcher (swbratcher)
on 2009-03-16 22:04
I'm getting the error after installing the mysql gem for rails 2.2.2 to
work, where all MySQL worked fine prior to this upgrade. Would this be
your suggestion even though MySQL was working prior to the mysql gem
installation?

>
> probably its version of mysql not this correct one
>
> uninstall mysql following these steps:
>
840bc06f9a050b18eb650c6dbb5255dc?d=identicon&s=25 Kieran Mcgrady (kmcgrady)
on 2009-07-15 23:09
> uninstall mysql following these steps:
>
> 1.   Open Terminal
> 2.   sudo nano /etc/hostconfig
> 3.   Delete the following line: "MYSQLCOM=-YES-"
> 4.   CTRL+x
> 5.   y
> 6.   CTRL+m
> 7.   Make sure MySQL is not running
> 8.   Open Terminal
> 9.   sudo rm /usr/local/mysql
> 10. sudo rm -rf /usr/local/mysql *
> 11. sudo rm -rf /Library/StartupItems/MySQLCOM
> 12. sudo rm -rf /Library/PreferencePanes/My*
> 13. sudo rm -rf /Library/Receipts/mysql*
> 14. sudo rm -rf /Library/Receipts/MySQL*


I am new to ruby and just followed your commands to uninstall mysql.
Thanks a lot. Now half my hard drive, all my documents, all my code is
gone. And I don't have a recent backup because my backup drive went down
recently. I have also lost the code for all the applications I have
written and as working on. These money I was making from these
applications is how I was going to afford college. Unless you can tell
me a way to get all my info back you are one stupid fu**ing a**hole.
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-07-16 02:21
Kieran Mcgrady wrote:
[...]
> I am new to ruby and just followed your commands to uninstall mysql.
> Thanks a lot. Now half my hard drive, all my documents, all my code is
> gone.

That's awful, and I'm verry sorry to hear that.  However, as an
otherwise uninvolved bystander, I will point these facts out.

* Rodrigo's advice was probably inaccurate.
* One of his commands had what appears to be a typo making it into
(basically) rm * , which clears the current directory.
* This is a very basic error.  Anyone (such as you) developing apps on a
Unix system should be able to spot it immediately.
* You were running commands that you didn't really understand, without a
usable backup.
* When things went wrong, you started calling names in a public forum.

As I said above, I think it's awful that Rodrigo's mistake cost you so
much, but I figured I'd point out what you could have done differently.
Hopefully, this will prevent something similar from happening again.
Good luck!

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
A35e9699cb8ba871c34eee0459cab7dc?d=identicon&s=25 Rick (Guest)
on 2009-07-16 04:07
(Received via mailing list)
On Wed, Jul 15, 2009 at 5:09 PM, Kieran Mcgrady <
rails-mailing-list@andreas-s.net> wrote:

> > 7.   Make sure MySQL is not running
> Thanks a lot. Now half my hard drive, all my documents, all my code is
> gone. And I don't have a recent backup because my backup drive went down
> recently. I have also lost the code for all the applications I have
> written and as working on. These money I was making from these
> applications is how I was going to afford college. Unless you can tell
> me a way to get all my info back you are one stupid fu**ing a**hole.
>

"These money I was making from these applications is how I was going to
afford college."

I find this hard to believe. (still sucks if you ran step 10, though.)

If you don't do much since the delete there might be some recovery tools
you
can use to get some stuff back.
840bc06f9a050b18eb650c6dbb5255dc?d=identicon&s=25 Kieran Mcgrady (kmcgrady)
on 2009-07-16 11:44
First off I apologize for my language but I'm sure you can understand
how frustrated I was.

@Rick
I tried data recovery tools but they couldn't find anything; all my
files were completely gone. I had to reinstall leopard but thanks for
the advice anyway.
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-07-16 12:14
(Received via mailing list)
2009/7/16 Kieran Mcgrady <rails-mailing-list@andreas-s.net>:
>
> First off I apologize for my language but I'm sure you can understand
> how frustrated I was.
>
> @Rick
> I tried data recovery tools but they couldn't find anything; all my
> files were completely gone. I had to reinstall leopard but thanks for
> the advice anyway.
>

And the moral, which we all learn the hard way at least once in our
careers, is always have a backup.  If there is a problem with the
backup system so backup is not possible then fixing that is more
important than continuing development.
Also check that the backup is actually working correctly by
occasionally doing a restore, in particular after any changes to the
backup system.

Little consolation now I know.  Most of us have been there, those that
have not probably will at some point.

Colin
Cb0b370f3218e00f51288257fd017c1c?d=identicon&s=25 Raj Goyal (goyalkrraj)
on 2009-12-22 16:28
jabauer wrote:
> I just updated to Rails 2.2.2 from 1.2.6 yesterday.  Today I
> reinstalled the  mysql gem.  Now when I try to run script/server the
> server starts, but when I try to access my database in a browser
> window get the following error:
>
> dyld: lazy symbol binding failed: Symbol not found: _mysql_init
>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
> mysql.bundle
>   Expected in: dynamic lookup
>
> dyld: Symbol not found: _mysql_init
>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
> mysql.bundle
>   Expected in: dynamic lookup
>
> Trace/BPT trap
>
> Any suggestions would be most appreciated.
>
> Thanks!


Please don't use this article, you will lose your data / files.
I uses this article on my mac and have lost everything.
Cb0b370f3218e00f51288257fd017c1c?d=identicon&s=25 Raj Goyal (goyalkrraj)
on 2009-12-22 16:30
Why this Article is here, there is no warning.
Is it not possible to remove this article?

Raj Goyal wrote:
> jabauer wrote:
>> I just updated to Rails 2.2.2 from 1.2.6 yesterday.  Today I
>> reinstalled the  mysql gem.  Now when I try to run script/server the
>> server starts, but when I try to access my database in a browser
>> window get the following error:
>>
>> dyld: lazy symbol binding failed: Symbol not found: _mysql_init
>>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
>> mysql.bundle
>>   Expected in: dynamic lookup
>>
>> dyld: Symbol not found: _mysql_init
>>   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
>> mysql.bundle
>>   Expected in: dynamic lookup
>>
>> Trace/BPT trap
>>
>> Any suggestions would be most appreciated.
>>
>> Thanks!
>
>
> Please don't use this article, you will lose your data / files.
> I uses this article on my mac and have lost everything.
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-12-22 16:55
Raj Goyal wrote:
>
> Why this Article is here, there is no warning.
> Is it not possible to remove this article?

Probably not.  This forum is just a mirror of a mailing list.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-12-22 19:32
(Received via mailing list)
2009/12/22 Raj Goyal <lists@ruby-forum.com>:
>>
>
>
> Please don't use this article, you will lose your data / files.
> I uses this article on my mac and have lost everything.

Which article?  I don't see any article referenced in your post.

Colin

--

You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
This topic is locked and can not be replied to.