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

Ryan Raaum
Mon, 26 Sep 2005 16:49:48 -0000

For the ruby mysql bindings, I''ve had better luck building from source
than from the gem.

curl -O http://tmtm.org/downloads/mysql/ruby/mysql-ruby-2.7.tar.gz
tar -xvzf mysql-ruby-2.7.tar.gz
cd mysql-ruby-2.7
ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config
make
sudo make install
cd ..
rm -rf mysql-ruby-2.7
rm mysql-ruby-2.7.tar.gz


--ryan

On 9/26/05, Mats Persson <mats-uGq4Pdis5ybkYMGBc/C6ZA@public.gmane.org>
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 -
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ryan Raaum
http://www.rockefeller.edu -- Bacterial Pathogenesis and Immunology
http://www.worldmartial.com -- Black Belt Instructor
http://locomotive.sourceforge.net -- Self contained one-click Rails for Mac OS X