Arpan
2006-Jan-29 17:43 UTC
[Rails] ruby can''t open library: /Library/MySQL/lib/mysql/libmysqlcl
When I try to start a Rails app, I get the following error: ruby can''t open library: /Library/MySQL/lib/mysql/libmysqlclient.12.dylib I''m on OS X and was previously using Complete MySQL. Recently, I upgraded to MySQL 4.1 using the regular MySQL installer. I think that this problem probably occurred after that upgrade, as I have not used Rails after upgrading (about a couple weeks). Any idea how to correct the problem? Thanks. Arpan -- Posted via http://www.ruby-forum.com/.
Ben Munat
2006-Jan-29 19:52 UTC
[Rails] ruby can''t open library: /Library/MySQL/lib/mysql/libmysqlcl
This is just a wild guess from left field, but I had troubles on linux when I switched to MySQL 4.1 because stuff was still looking for the libmysqlclient.so.12 and MySQL had a newer version. Had to reinstall everything that used that module. So, in short, try reinstalling the ruby mysql connector. b Arpan wrote:> When I try to start a Rails app, I get the following error: > > ruby can''t open library: > /Library/MySQL/lib/mysql/libmysqlclient.12.dylib > > I''m on OS X and was previously using Complete MySQL. Recently, I > upgraded to MySQL 4.1 using the regular MySQL installer. > > I think that this problem probably occurred after that upgrade, as I > have not used Rails after upgrading (about a couple weeks). > > Any idea how to correct the problem? > > Thanks. > Arpan >
Arpan
2006-Jan-30 02:29 UTC
[Rails] Re: ruby can''t open library: /Library/MySQL/lib/mysql/libmys
I tried that. I ran this command. sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql And it gave a success message. But I still get the same error. Anything else I should do? -- Posted via http://www.ruby-forum.com/.
Ben Munat
2006-Jan-30 05:50 UTC
[Rails] Re: ruby can''t open library: /Library/MySQL/lib/mysql/libmys
Hey Arpan... sorry but I don''t do much on Macs. My only further suggestion would be to search the web for "ruby libmysqlclient.so.12" (or whatever it was) and search your hard drive for any all copies of libmysqlclient. Maybe it''s actually there but a path is screwed up. That and hopefully someone else will be able to answer... as we''ve seen ample evidence of lately, there are a lot of Mac users on this list! You should probably reply and post the error you get again... and mabye your versions of everything (ruby, gems, mysql, OS X). good luck, b Arpan wrote:> I tried that. > > I ran this command. > sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql > > And it gave a success message. But I still get the same error. Anything > else I should do? >
Arpan
2006-Jan-30 19:42 UTC
[Rails] Re: Re: ruby can''t open library: /Library/MySQL/lib/mysql/li
> You should probably reply and post the error you get again... and mabye > your versions of > everything (ruby, gems, mysql, OS X).This is what happens. I start the webbrick server from the console. It starts and opens the intro page. But when I try to access any controller that accesses the DB, it fails, and the server terminates with this message: dyld: ruby can''t open library: /Library/MySQL/lib/mysql/libmysqlclient.12.dylib (No such file or directory, errno = 2) Trace/BPT trap ruby: 1.8.2 mysql: 4.1 os X: 10.3.9 As noted, I have tried reinstalling the mysql ruby gem, but no change. Also, I searched for the above mentioned file, and it does not exist of the system, so I guess the new version does not have that file. After deleting the previous version of MySQL (Complete Mysql 4.0), I installed MySQL 4.1 using the installer from MySQL website. I think that the problem might lie with some configuration error with Ruby, but have no idea of how to correct it. If there is no way to correct it, I might have to reinstall Ruby and the gems. Would that be the correct option. If so, what would be the best way to remove, and then reinstall it? Appreciate any help you can provide. Thank you. Arpan -- Posted via http://www.ruby-forum.com/.