Hi, I have activated scaffold in my first rails application ( following http://manuals.rubyonrails.com/read/chapter/38 ) and now I get the next error ''Packets out of order'' error was received from the database. Please update your mysql bindings (gem update mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. if I run the "gem update mysql" command I get the next error. Upgrading installed gems... Attempting remote upgrade of mysql Attempting remote installation of ''mysql'' Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 for inspection. ruby extconf.rb update mysql\nchecking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no How can I fix this ? Kind Regards, Herbert
On 10/22/05, Herbert Groot Jebbink <herbert.groot.jebbink-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> if I run the "gem update mysql" command I get the next error. > > [...] > > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 for inspection. > ruby extconf.rb update mysql\nchecking for mysql_query() in > -lmysqlclient... noI just found the answer to this in Stephen Downe''s fascinating post on his experiences installing Rails: http://www.downes.ca/cgi-bin/page.cgi?post=31620 If you scroll waaayyyy down -- around line 513 or so -- you''ll see the long version. The short version: run the following: cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 sudo ruby extconf.rb --with-mysql-dir=/usr/local/mysql sudo make sudo make install sudo gem [update|install] mysql And you should be good to go. extconf.rb just looks for MySQL in the wrong spot. Good luck.... -- Chris Boone http://hypsometry.com/ : website edification http://uvlist.org/ : free classifieds for the Upper Valley
thanks, this did solve it. hgj On 10/22/05, Chris Boone <hypsometry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/22/05, Herbert Groot Jebbink <herbert.groot.jebbink-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > if I run the "gem update mysql" command I get the next error. > > > > [...] > > > > ERROR: While executing gem ... (RuntimeError) > > ERROR: Failed to build gem native extension. > > Gem files will remain installed in > > /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 for inspection. > > ruby extconf.rb update mysql\nchecking for mysql_query() in > > -lmysqlclient... no > > I just found the answer to this in Stephen Downe''s fascinating post on > his experiences installing Rails: > > http://www.downes.ca/cgi-bin/page.cgi?post=31620 > > If you scroll waaayyyy down -- around line 513 or so -- you''ll see the > long version. > > The short version: run the following: > > cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.6 > sudo ruby extconf.rb --with-mysql-dir=/usr/local/mysql > sudo make > sudo make install > sudo gem [update|install] mysql > > And you should be good to go. extconf.rb just looks for MySQL in the wrong spot. > > Good luck.... > > -- > Chris Boone > > http://hypsometry.com/ : website edification > http://uvlist.org/ : free classifieds for the Upper Valley >