Re: Please Help! OS X.4.2 problems after Security Update 2005-008

Ezra Zygmuntowicz
Mon, 26 Sep 2005 19:03:11 -0000

Hey Mats-
     Try to reinstall the mysql binding from source instead of from
gems. I had the same problem and this fixzed it for me:

curl -O http://www.tmtm.org/en/mysql/ruby/mysql-ruby-2.7.tar.gz
tar zxvf mysql-ruby-*
cd mysql-ruby-*
ruby extconf.rb --with-mysql-config
make
sudo make install


HTH-

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org


On Sep 26, 2005, at 8:39 AM, Mats Persson wrote:

>
> Hi all,
>
> It seems that the latest Mac Security Update 2005-008 somehow
> caused some problems on my install. Anyone else found that and/or
> knows how to work around this ??
>
> When I run  ./script/generate scaffold Reference  I get this error
>
>        error  Before updating scaffolding from new DB schema, try
> creating a table for your model (Reference)
>
> In AWDwR book this is indicated as:
>
>
>> If you see the error Before updating scaffolding from new DB
>> schema, try creating a table for your model (Product), it may well
>> be because Ruby (and hence Rails)
>> can’t get to the database. To fix Apple’s bad install, you’re
>> going to need to reinstall Ruby’s  MySQL library, which means
>> going back to on page 21, running the script to repair the Ruby
>> installation, and then reinstalling the mysql gem.
>>
>>
> So I''ve followed the instructions in the book, but get this:
>
>
>> iMacG5:~/rubygems-0.8.11 mats$ sudo ruby setup.rb
>> Password:
>> ---> bin
>> <--- bin
>> ---> lib
>> ---> lib/rubygems
>> <--- lib/rubygems
>> <--- lib
>> ---> bin
>> adjusting shebang: gem_mirror
>> <--- bin
>> ---> lib
>> ---> lib/rubygems
>> <--- lib/rubygems
>> <--- lib
>> rm -f InstalledFiles
>> ---> bin
>> mkdir -p /usr/bin/
>> install gem /usr/bin/
>> install gem_mirror /usr/bin/
>> install gem_server /usr/bin/
>> install gemwhich /usr/bin/
>> install generate_yaml_index.rb /usr/bin/
>> install update_rubygems /usr/bin/
>> <--- bin
>> ---> lib
>> mkdir -p /usr/lib/ruby/site_ruby/1.8/
>> install gemconfigure.rb /usr/lib/ruby/site_ruby/1.8/
>> install rubygems.rb /usr/lib/ruby/site_ruby/1.8/
>> install ubygems.rb /usr/lib/ruby/site_ruby/1.8/
>> ---> lib/rubygems
>> mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems
>> install builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install cmd_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install command.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install config_file.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install custom_require.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install dependency_list.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install deployment.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install doc_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install format.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install gem_commands.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install gem_openssl.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install gem_runner.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install loadpath_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install old_format.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install open-uri.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install package.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install remote_installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install rubygems_version.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install security.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install source_index.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install specification.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install timer.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install user_interaction.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install validator.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> install version.rb /usr/lib/ruby/site_ruby/1.8/rubygems
>> <--- lib/rubygems
>> <--- lib
>>
>> As of RubyGems 0.8.0, library stubs are no longer needed.
>> Searching $LOAD_PATH for stubs to optionally delete (may take a
>> while)...
>> ...done.
>> No library stubs found.
>>
>>   Successfully built RubyGem
>>   Name: sources
>>   Version: 0.0.1
>>   File: sources-0.0.1.gem
>> iMacG5:~/rubygems-0.8.11 mats$ sudo gem install rails --include-
>> dependencies
>> Attempting local installation of ''rails''
>> Local gem file not found: rails*.gem
>> Attempting remote installation of ''rails''
>> Successfully installed rails-0.13.1
>> iMacG5:~rubygems-0.8.11 mats$
>>
>
>
> And still the problems persists.
>
> So I do   sudo gem install mysql  and get this:
>
>
>> Attempting local installation of ''mysql''
>> Local gem file not found: mysql*.gem
>> 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/lib/ruby/gems/1.8/gems/
>> mysql-2.6 for inspection.
>>   ruby extconf.rb install 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... no
>> checking for mysql_query() in -lmysqlclient... no
>>
>> Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.6/gem_make.out
>>
>
>
> Everything was working fine up until I did that OS X update last
> night.  Also using the Locomotive 0.21/2 app with the same results.
>
> Any ideas of how to get back on the rails again ??
>
>
>
>
> Kind regards,
>
> Mats
>
> ----
> "TextMate, coding with an incredible sense of joy and ease"
> - www.macromates.com -