Once I heard that 0.13 is out I updated as soon as I could. However, this appears to have broken the MySQL link under OS X Tiger. I tried blowing away the mysql gem, rebooting, and reinstalling it both with just "sudo gem install mysql" and "sudo gem install mysql -- --with- mysql-dir=/usr/local/mysql". Neither have any effect and I am stuck staring at the "No database selected: SELECT * FROM communities" error. Has anyone else come across this since upgrading? Has anyone been able to fix it if it has happened to them? -Scotty _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''m not seeing any problem like this with 0.13 on OS X Tiger after a successful "gem update". My Rails apps connect to MySQL without a problem.> Once I heard that 0.13 is out I updated as soon as I could. However, > this appears to have broken the MySQL link under OS X Tiger.
It appears to be a rather esoteric glitch between the gcc 4.0 compiler and the compilation of the mysql 2.6 gem. I happened to upgrade rails and mysql both at once so that''s what was confusing me. Anyway, for those who DO run into this issue setting your compiler back to use 3.3 will work and correct the mysql compilation issue: sudo gcc_select 3.3 And then uninstall and reinstall the mysql gem. There is a patch to the mysql.c file that fixes this. But I''m so not a programmer at that level (just a web guy still) so I didn''t bother trying it. http://tech.rufy.com/entry/46 It''s the very last two comments as of this email. On Jul 6, 2005, at 10:53 PM, Andrew Otwell wrote:> I''m not seeing any problem like this with 0.13 on OS X Tiger after > a successful "gem update". My Rails apps connect to MySQL without a > problem. > > >> Once I heard that 0.13 is out I updated as soon as I could. However, >> this appears to have broken the MySQL link under OS X Tiger. >> > >
Andrew Stuart
2005-Jul-07 09:30 UTC
Sales On Rails - project commencement and call for team members
Hey folks, A small but enthusiatic team has formed to envision and develop Sales On Rails - the definitive sales management/contact management system built using Rails. A first class sales and contact management is an application genuinely needed by many businesses and would be a great flagship app to show off Rails to the world. Patrice Neff, Kevin Fullerton, and David Richards are on the team so far. Now is the time to join if you''d like to play an active role - vision and scope is being explored, decisions are being made about what to do and how to do it. Servers have been set up and login accounts to development servers are available. The more bright minds the better, so if you want a great sales/contact management system built in Rails then jump on over to http://wiki.rubyonrails.com/rails/show/SalesOnRails and sign up. The project needs a project lead too, so perhaps in the next few weeks interested people might nominate themselves for the job. Unfortunately for me my role is limited to getting the project bootstrapped due to serious time pressure trying to start and run a new business (and write some software in Rails to run the new business). Roll on! Andrew Stuart _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I did the gem update rails and now I can''t connect to mysql from rails. I get the following errors when I attempt to "gem install mysql" 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 -- --with-mysql-lib=/usr/local/lib/ mysql --with-mysql-include=/usr/local/include\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 Any idea what causes this? Everything was working fine last night when I was running the beta. Could that be the problem? I went back and installed 1.8 with the OSX installer, but it made no difference. On Jul 6, 2005, at 10:30 PM, Scott Doane wrote:> It appears to be a rather esoteric glitch between the gcc 4.0 > compiler and the compilation of the mysql 2.6 gem. I happened to > upgrade rails and mysql both at once so that''s what was confusing me. > > Anyway, for those who DO run into this issue setting your compiler > back to use 3.3 will work and correct the mysql compilation issue: > > sudo gcc_select 3.3 > > And then uninstall and reinstall the mysql gem. There is a patch to > the mysql.c file that fixes this. But I''m so not a programmer at > that level (just a web guy still) so I didn''t bother trying it. > > http://tech.rufy.com/entry/46 > > It''s the very last two comments as of this email. > > > On Jul 6, 2005, at 10:53 PM, Andrew Otwell wrote: > > >> I''m not seeing any problem like this with 0.13 on OS X Tiger after >> a successful "gem update". My Rails apps connect to MySQL without >> a problem. >> >> >> >>> Once I heard that 0.13 is out I updated as soon as I could. However, >>> this appears to have broken the MySQL link under OS X Tiger. >>> >>> >> >> >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Ron Davis http://www.radproductions.net/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I figured out the problem. I was cutting the command from a web page and it looked like there was 2 dashes, then 1 dash before with. In reality it was 2 and 2. sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql On Jul 7, 2005, at 3:26 PM, Ron Davis wrote:> I did the gem update rails and now I can''t connect to mysql from > rails. > > I get the following errors when I attempt to "gem install mysql" > > 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 -- --with-mysql-lib=/usr/local/lib/ > mysql --with-mysql-include=/usr/local/include\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 > > Any idea what causes this? Everything was working fine last night > when I was running the beta. Could that be the problem? I went back > and installed 1.8 with the OSX installer, but it made no difference. > > > On Jul 6, 2005, at 10:30 PM, Scott Doane wrote: > >> It appears to be a rather esoteric glitch between the gcc 4.0 >> compiler and the compilation of the mysql 2.6 gem. I happened to >> upgrade rails and mysql both at once so that''s what was confusing me. >> >> Anyway, for those who DO run into this issue setting your compiler >> back to use 3.3 will work and correct the mysql compilation issue: >> >> sudo gcc_select 3.3 >> >> And then uninstall and reinstall the mysql gem. There is a patch >> to the mysql.c file that fixes this. But I''m so not a programmer >> at that level (just a web guy still) so I didn''t bother trying it. >> >> http://tech.rufy.com/entry/46 >> >> It''s the very last two comments as of this email. >> >> >> On Jul 6, 2005, at 10:53 PM, Andrew Otwell wrote: >> >> >>> I''m not seeing any problem like this with 0.13 on OS X Tiger >>> after a successful "gem update". My Rails apps connect to MySQL >>> without a problem. >>> >>> >>> >>>> Once I heard that 0.13 is out I updated as soon as I could. >>>> However, >>>> this appears to have broken the MySQL link under OS X Tiger. >>>> >>>> >>> >>> >>> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > Ron Davis > http://www.radproductions.net/ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Ron Davis http://www.radproductions.net/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Try this: $ sudo gem install mysql --with-mysql-config Thats what has worked for me on Tiger. If that doesn''t work then possibly try this: $gcc_select 3.3 $sudo gem install mysql --with-mysql-config Good Luck - _Ezra On Jul 7, 2005, at 1:26 PM, Ron Davis wrote:> I did the gem update rails and now I can''t connect to mysql from > rails. > > I get the following errors when I attempt to "gem install mysql" > > 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 -- --with-mysql-lib=/usr/local/lib/ > mysql --with-mysql-include=/usr/local/include\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 > > Any idea what causes this? Everything was working fine last night > when I was running the beta. Could that be the problem? I went back > and installed 1.8 with the OSX installer, but it made no difference. > > > On Jul 6, 2005, at 10:30 PM, Scott Doane wrote: > >> It appears to be a rather esoteric glitch between the gcc 4.0 >> compiler and the compilation of the mysql 2.6 gem. I happened to >> upgrade rails and mysql both at once so that''s what was confusing me. >> >> Anyway, for those who DO run into this issue setting your compiler >> back to use 3.3 will work and correct the mysql compilation issue: >> >> sudo gcc_select 3.3 >> >> And then uninstall and reinstall the mysql gem. There is a patch >> to the mysql.c file that fixes this. But I''m so not a programmer >> at that level (just a web guy still) so I didn''t bother trying it. >> >> http://tech.rufy.com/entry/46 >> >> It''s the very last two comments as of this email. >> >> >> On Jul 6, 2005, at 10:53 PM, Andrew Otwell wrote: >> >> >>> I''m not seeing any problem like this with 0.13 on OS X Tiger >>> after a successful "gem update". My Rails apps connect to MySQL >>> without a problem. >>> >>> >>> >>>> Once I heard that 0.13 is out I updated as soon as I could. >>>> However, >>>> this appears to have broken the MySQL link under OS X Tiger. >>>> >>>> >>> >>> >>> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > Ron Davis > http://www.radproductions.net/ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
I''ve just been playing around with all this on my Tiger installation. I have mysql 4.1.11 installed in /usr/local/mysql using the standard mysql installers, and the following magic worked for building the mysql gem: % sudo gcc_select 3.3 % sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/ mysql_config % sudo gcc_select 4.0 Only problem is that I still get this: % ./script/console Loading development environment. >> require_library_or_gem ''mysql'' => false which, according to http://blog.x180.net/2005/07/ rails_and_mysql.html , means that the gem isn''t working for some reason. Anyone got any ideas? Rails is definitely running more slowly in development mode with Webrick under 0.13 than it was under 0.12.1, by the way. It''s not a big problem for me, but I''d still like to speed it up a bit. Pete Yandell
On 08/07/2005, at 9:10 AM, Pete Yandell wrote:> Only problem is that I still get this: > > % ./script/console > Loading development environment. > >> require_library_or_gem ''mysql'' > => falseOh, wait...a false is OK here. It''s only if I get an error at this point that it''s bad. That means that my recipe from the previous post is all good.
Andrew Stuart
2005-Jul-08 00:31 UTC
real rails programmer don''t use ruby script\generate?
do experienced rails programmers use the generate scripts? for example: ruby script\generate model or are these scripts just for handholding newbies? do experienced rails programmers always code by hand? as a newbie trying to learn more am I just wasting my time by coming to grips with what script/generate does? thanks in advance andrew
Lucas Carlson
2005-Jul-08 00:33 UTC
Re: real rails programmer don''t use ruby script\generate?
> do experienced rails programmers use the generate scripts? for > example: > > ruby script\generate modelAll the time. Who wants to write boilerplate code all day?> do experienced rails programmers always code by hand?Always and never are usually bad words.> as a newbie trying to learn more am I just wasting my time by > coming to > grips with what script/generate does?No way, not at all. -Lucas http://tech.rufy.com/
Jamis Buck
2005-Jul-08 00:36 UTC
Re: real rails programmer don''t use ruby script\generate?
On Jul 7, 2005, at 6:31 PM, Andrew Stuart wrote:> do experienced rails programmers use the generate scripts? for > example: > > ruby script\generate model > > or are these scripts just for handholding newbies? > > do experienced rails programmers always code by hand? > > as a newbie trying to learn more am I just wasting my time by > coming to > grips with what script/generate does?I use the generators. Experienced or not, something that writes code for you is always a time saver. What is more, the model and controller generators stub out the tests for you, which makes it that much easier to get your tests going right from the beginning. - Jamis
Jeremy Kemper
2005-Jul-08 00:43 UTC
Re: real rails programmer don''t use ruby script\generate?
On Jul 7, 2005, at 5:31 PM, Andrew Stuart wrote:> do experienced rails programmers use the generate scripts? for > example: > > ruby script\generate model > > or are these scripts just for handholding newbies? > > do experienced rails programmers always code by hand? > > as a newbie trying to learn more am I just wasting my time by > coming to > grips with what script/generate does? > > thanks in advance > > andrewNew and old alike use generators primarly as a means to simultaneously sketch out the beginnings for your core code and their unit tests. Generators are scrawl crude lines; you are the crayons. Down the road you can even create your own to write code in your own style. Heck, pack them up as gems and begin proselytizing! Best, jeremy
On Jul 7, 2005, at 16:15 , Pete Yandell wrote:>> Only problem is that I still get this: >> >> % ./script/console >> Loading development environment. >> >> require_library_or_gem ''mysql'' >> => false >> > > Oh, wait...a false is OK here. It''s only if I get an error at this > point that it''s bad. That means that my recipe from the previous > post is all good.Yep. It''s a load error that causes the Ruby-based one to be used. What you''re simulating with this call is what the mysql adapter in Active Record is doing. You can see this at: http://dev.rubyonrails.org/svn/rails/tags/rel_0-13-0/ activerecord/lib/active_record/connection_adapters/mysql_adapter.rb Look at lines 10-11. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails