[Rails] Re: MySQL Installation Issues

2012-08-29 Thread Simon R.
This is an old thread, but if you google the error message, it appears first in the list of results, so it's worth writing a summary. The root of the problem is that to install the mysql gem you need to compile some native code. ("Native code" is software written in a language such as C or C++

[Rails] Re: mySQL: ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)

2012-02-01 Thread Pallav_bfs
Sorry for delayed response,Colin. Your advice helped and I fixed the error. Thanks ! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group,

[Rails] Re: mySQL: ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)

2012-02-01 Thread Pallav_bfs
Thanks Norm! I fixed the error.I used a wrong password in database.yml. And sorry for delayed response. Thanks for your response :) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@goog

[Rails] Re: MySQL Installation Issues

2012-01-12 Thread Puneet S.
Wainer Moschetta wrote in post #773714: > I was facing this same issue. I just installed libmysqlclient15-dev on > my syste (ubuntu 8.10) and could get gem mysql installed successfully > > William Pratt wrote: >> It's very possible that it is looking for libmysqlclient (I am almost >> positive it d

[Rails] Re: mySQL RoR

2012-01-07 Thread muhammad singgih zulfikar ansori
Oh, I see so there are free if I read it online and phpmyadmin isn't required for RoR. next time I'll ask again :D Thankyou On Saturday, January 7, 2012, Colin Law wrote: > On 7 January 2012 13:04, muhammad singgih zulfikar ansori > > wrote: > > Anyone, I need some help to configure RoR using MyS

[Rails] Re: mysql compatibility error--already reported by another correspondent

2012-01-04 Thread Mihir Vaidya
I found a workaround for this problem -- http://blog.readypulse.com/2011/12/07/installing-ruby-on-rails-3-1-1-with-mysql-on-windows-7-64-bit/#comment-84 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: mysql compatibility error--already reported by another correspondent

2011-12-27 Thread Luis Lavena
On Dec 27, 1:50 pm, BWB wrote: > C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86- > mingw32/lib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client librar > y version! This gem was compiled for 6.0.0 but the client library is 5.5.19. > (RuntimeError) This has been asked several times on

[Rails] Re: MySQL errors on Cygwin - URGENT!!

2011-11-04 Thread venkata reddy
 I came across this problem several days ago,I'm using windows xp ,Here is my solution.      1. edit Gemfile => gem 'mysql2', '0.2.6'      2. download  mysql-noinstall-5.1.50-win32.zip  at http:// downloads.mysql.com/archives/mysql-5.1/mysql- noinstall-5.1.50-... ,unzip      3. gem install mysql2 -

Re: [Rails] Re: MySQL errors on Cygwin - URGENT!!

2011-11-04 Thread jsf
Cygwin is basically *nix (Linux?) on top of windows. J. On Fri, Nov 4, 2011 at 9:28 AM, venkata reddy wrote: > Which environment you are using...let  me know the OS especially... > > On Nov 4, 3:44 pm, Peter Hicks wrote: >> On Thu, Nov 03, 2011 at 05:13:37PM -0700, James Star wrote: >> > "Could

[Rails] Re: MySQL errors on Cygwin - URGENT!!

2011-11-04 Thread venkata reddy
Which environment you are using...let me know the OS especially... On Nov 4, 3:44 pm, Peter Hicks wrote: > On Thu, Nov 03, 2011 at 05:13:37PM -0700, James Star wrote: > > "Could not create Makefile due to some reason, probably lack of > > necessary libraries and/or headers.  Check the mkmf.log f

[Rails] Re: MYSQL and 3.1 hogging cpu

2011-10-21 Thread Frederick Cheung
On Oct 21, 4:34 pm, Richard Palackas wrote: > Is anyone else experiencing very long very high amounts of cpu usage by > their mysql daemon that can last for a minute or more when a page is > going to load with an error? I'm even getting these on pages with only > one or two simple find statement

Re: [Rails] Re: MySQL ActiveRecord::StatementInvalid on insert w/ no detail?

2011-10-06 Thread Denis Haskin
No, although I realize I should enable the general query log to see if I can catch it there. For what it's worth, I did drop in the mysql2 gem yesterday and so far the error has not occurred again. However, since it's not consistently reproducible, that doesn't necessarily make me more confident

[Rails] Re: MySQL ActiveRecord::StatementInvalid on insert w/ no detail?

2011-10-06 Thread Frederick Cheung
On Oct 4, 2:41 pm, Denis Haskin wrote: > Rails 3.1.0.rc8 > > I'm getting strange & unfortunately not consistently reproducible > errors.  Because it happens more frequently w/ multiple simultaneous > clients, I suspect possibly some kind of transaction/locking issue, > but it's unclear. > > Ever

[Rails] Re: MySQL returns time with UTC time zone instead of local one

2011-07-26 Thread Marek Osvald
You were right. Thanks a lot, pal. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send em

[Rails] Re: MySQL returns time with UTC time zone instead of local one

2011-07-26 Thread Frederick Cheung
On Jul 26, 12:52 pm, Marek Osvald wrote: > Hey, > > I'm trying to write a simple application with Ruby on Rails that works > in my timezone (Prague, UTC + 1). I've set my application.rb like this: > > #application.rb > config.time_zone = 'Prague' > > and it seems to be working, for example: > >

[Rails] Re: mysql server has gone away?

2011-05-20 Thread Ed Murray
"The child process can exit using Kernel.exit! to avoid running any at_exit functions." This seems to have fixed the issue for me. I have no at_exit functions I need executed. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gro

[Rails] Re: Mysql dapter reporting Duplicate Entry mystery

2011-04-28 Thread Owain
On Apr 28, 1:18 pm, Frederick Cheung wrote: > On 28 Apr 2011, at 13:13, Owain wrote: > > > > > > > On Apr 28, 12:57 pm, Frederick Cheung > > wrote: > > >>> mysql> insert into confirmations (quote_id) values(188); > >>> Query OK, 1 row affected (0.01 sec) > > >>> mysql> select * from confirmati

Re: [Rails] Re: Mysql dapter reporting Duplicate Entry mystery

2011-04-28 Thread Frederick Cheung
On 28 Apr 2011, at 13:13, Owain wrote: > On Apr 28, 12:57 pm, Frederick Cheung > wrote: > >>> mysql> insert into confirmations (quote_id) values(188); >>> Query OK, 1 row affected (0.01 sec) >> >>> mysql> select * from confirmations where quote_id = 188; >> >> Why are you filtering by quote

[Rails] Re: Mysql dapter reporting Duplicate Entry mystery

2011-04-28 Thread Owain
On Apr 28, 12:57 pm, Frederick Cheung wrote: > > mysql> insert into confirmations (quote_id) values(188); > > Query OK, 1 row affected (0.01 sec) > > > mysql> select * from confirmations where quote_id = 188; > > Why are you filtering by quote_id here? > Fred, Just to show that the mysql CLI cl

[Rails] Re: Mysql dapter reporting Duplicate Entry mystery

2011-04-28 Thread Frederick Cheung
On Apr 28, 12:53 pm, Owain wrote: > > mysql> insert into confirmations (quote_id) values(188); > Query OK, 1 row affected (0.01 sec) > > mysql> select * from confirmations where quote_id = 188; Why are you filtering by quote_id here? Fred > +-+--+---+-+-

[Rails] Re: mysql key too long error

2011-04-25 Thread Mike C
Nevermind, I got it. I just have to test to see if it works. Thanks for your help! On Apr 24, 3:49 pm, Mike C wrote: > Oh, I was looking for an example of how to use it like a piece of code > or something. > > On Apr 24, 7:51 am, Frederick Cheung > wrote: > > > > > On Apr 24, 9:23 am, Mike C wr

[Rails] Re: mysql key too long error

2011-04-24 Thread Mike C
Oh, I was looking for an example of how to use it like a piece of code or something. On Apr 24, 7:51 am, Frederick Cheung wrote: > On Apr 24, 9:23 am, Mike C wrote: > > > How can I use the :limit to change taggable_ type and context? > > The limit tells mysql how much of the column to use for th

[Rails] Re: mysql key too long error

2011-04-24 Thread Frederick Cheung
On Apr 24, 9:23 am, Mike C wrote: > How can I use the :limit to change taggable_ type and context? The limit tells mysql how much of the column to use for the index. Pick values such that your total index length falls within the limit (you're probably better off picking a smaller value for tagg

[Rails] Re: mysql key too long error

2011-04-24 Thread Mike C
How can I use the :limit to change taggable_ type and context? On Apr 24, 12:32 am, Frederick Cheung wrote: > On Apr 23, 11:23 pm, Mike C wrote: > > > I'm using the acts as taggable on plugin, and in the migrations > > there's a line of code to create an index: > > > add_index :taggings, [:tagga

[Rails] Re: mysql key too long error

2011-04-24 Thread Frederick Cheung
On Apr 23, 11:23 pm, Mike C wrote: > I'm using the acts as taggable on plugin, and in the migrations > there's a line of code to create an index: > > add_index :taggings, [:taggable_id, :taggable_type, :context], :name > => "tagging_index", :limit => {:name => 10, :surname => 20} > > When I use

[Rails] Re: MySQL Installation Issues

2011-03-30 Thread bill gate
apt-get install libmysqld-dev will be ok . -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group

[Rails] Re: MySQL & ActiveRecord Licenses

2011-03-21 Thread Paul E. G. Lynch
On Mar 21, 4:46 pm, Frederick Cheung wrote: > On Mar 21, 8:05 pm, "Paul E. G. Lynch" wrote: > > That said, activerecord doesn't link to any native libraries. If you > use the mysql adapter, that pulls in the mysql gem, which does > obviously load the mysql library, but if you don't use mysql t

Re: [Rails] Re: MySQL & ActiveRecord Licenses

2011-03-21 Thread Chris Mear
On 21 Mar 2011, at 20:33, Bryan Crossland wrote: > On Mon, Mar 21, 2011 at 3:05 PM, Paul E. G. Lynch wrote: > >> GPL requires that if you link with the library, you have to have a GPL- >> compatible license so that the result is available under GPL. See: >> http://www.gnu.org/licenses/gpl-faq.ht

[Rails] Re: MySQL & ActiveRecord Licenses

2011-03-21 Thread Frederick Cheung
On Mar 21, 8:05 pm, "Paul E. G. Lynch" wrote: > GPL requires that if you link with the library, you have to have a GPL- > compatible license so that the result is available under GPL.   > See:http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL > > So, if ActiveRecord is linking with the MySQ

Re: [Rails] Re: MySQL & ActiveRecord Licenses

2011-03-21 Thread Bryan Crossland
On Mon, Mar 21, 2011 at 3:05 PM, Paul E. G. Lynch wrote: > GPL requires that if you link with the library, you have to have a GPL- > compatible license so that the result is available under GPL. See: > http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL > > So, if ActiveRecord is linking with

[Rails] Re: MySQL & ActiveRecord Licenses

2011-03-21 Thread Paul E. G. Lynch
GPL requires that if you link with the library, you have to have a GPL- compatible license so that the result is available under GPL. See: http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL So, if ActiveRecord is linking with the MySQL libraries, then my understanding is that it should be GP

[Rails] Re: mysql gem problems

2011-02-18 Thread Victor S
if you're on a mac, get homebrew, then type in your terminal "brew install mysql" -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, sen

[Rails] Re: mysql quotation wonky

2011-02-09 Thread anywho
So I solved it by doing a RACK_ENV=test before running my task. I suspect a bug since this probably shouldn't have been required and luckily all my related tasks here were to do with test, but they may not have been. Anyway, FYI On Feb 9, 9:28 am, anywho wrote: > this is happening in production

[Rails] Re: mysql quotation wonky

2011-02-09 Thread anywho
So I solved it by doing a RACK_ENV=test before running my task. I suspect a bug since this probably shouldn't have been required and luckily all my related tasks here were to do with test, but they may not have been. Anyway, FYI On Feb 9, 9:28 am, anywho wrote: > this is happening in production

[Rails] Re: mysql quotation wonky

2011-02-09 Thread anywho
this is happening in production only it would seem. Running 1.9.2 with an isolated gem env via rvm Fedora release 8 (Werewolf) Gems included by the bundle: * ZenTest (4.4.0) * abstract (1.0.0) * actionmailer (3.0.4) * actionpack (3.0.4) * activemerchant (1.5.1) * activemodel (3.0.4)

[Rails] Re: mysql quotation wonky

2011-02-08 Thread Nikos Dimitrakopoulos
Mine are running ok in 3.0.3 (and I will try 3.0.4 tomorrow). What environment are you running on (os, ruby, gems, etc)? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.c

[Rails] Re: mysql quotation wonky

2011-02-08 Thread anywho
I have this issue in Rails 3.0.4 as well Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '."version" FROM "schema_migrations"' at line 1: SELECT "schema_migrations"."version" FROM "schema_migrations

[Rails] Re: Mysql query optimization for order condition

2011-02-08 Thread Victor Stan
Had same issue, this is what did it for me: apt-get update apt-get install libreadline5-dev rvm package install readline rvm package install zlib # probably not necessary rvm install 1.9.2 -C --with-zlib-dir=/usr/local/rvm/usr/lib --with-readline-dir=/usr/local/rvm/usr/lib -- Posted via http:

[Rails] Re: Mysql issue with rails 3 and Ruby 1.9.2

2011-02-01 Thread Selvaraj Subbaian
justinbaker wrote in post #978516: > Do you have Mysql installed? Not the gem, or the dll, but mysql.exe? > If you have it installed, check your environment PATH. > In cmd, try `mysql`. If it gives you `mysql is not recognized...`, > then you need to install it. Thanks to all, I am able to connect

[Rails] Re: Mysql issue with rails 3 and Ruby 1.9.2

2011-01-30 Thread justinbaker
Do you have Mysql installed? Not the gem, or the dll, but mysql.exe? If you have it installed, check your environment PATH. In cmd, try `mysql`. If it gives you `mysql is not recognized...`, then you need to install it. On Jan 30, 6:18 am, Selvaraj Subbaian wrote: > Hello, > > I am trying to ins

[Rails] Re: Mysql issue with rails 3 and Ruby 1.9.2

2011-01-30 Thread Alpha Blue
In your Gemfile place: gem 'mysql' In your database.yml file make sure you've changed mysql2 to mysql. Make sure that you are using the correct version of mysql and the correct dll based on 32 bit or 64 bit. Currently, 64 bit has numerous issues and you should just install the 32 bit ve

[Rails] Re: mysql gem migrate "Unknown database '[db_development]" error

2010-12-30 Thread Sebastian Bring
Oren Golan wrote in post #923611: > I had this issue after upgrading from ubuntu 9.10 (karmic) to 10.4 > (lucid). > the solution was to libmysqlclient16-dev: > > sudo aptitude install libmysqlclient16-dev As a Ubuntu user that did the trick for me. Thanks a lot, Oren! Your decision to post this pr

[Rails] Re: MySQL update BLOB

2010-12-23 Thread Roman Mandeleil
Yep I got it. So much trouble with the script so I missed the obvious. But, I still don't understand why the place holder for the update statement doesn't work: I mean that syntax: update_sql = "update SHARE set COMPANY_LOGO = ? WHERE ID = 8982167534873685924"; stmt = myconnect.prepare(update_sql

[Rails] Re: MySQL update BLOB

2010-12-23 Thread Marnen Laibow-Koser
Please quote when replying. Roman Mandeleil wrote in post #970391: > tinyblob Well, there's your problem -- a MySQL TINYBLOB only holds 255 bytes of data! Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. --

[Rails] Re: MySQL update BLOB

2010-12-23 Thread Roman Mandeleil
tinyblob -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+u

[Rails] Re: MySQL update BLOB

2010-12-23 Thread Frederick Cheung
On Dec 23, 8:51 pm, Roman Mandeleil wrote: > Hi I am trying to update a blob column from Ruby script into MySQL DB. > The script is running on PC and DB on Linux host. > The problem I see is that only 255 bytes of data being stored , > is there any way to deal with that problem ? What's the typ

[Rails] Re: Mysql query optimization for order condition

2010-12-16 Thread Daniel Salmer?n Amselem
Thanks! That makes much more sense. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@google

[Rails] Re: Mysql query optimization for order condition

2010-12-16 Thread Peter Vandenabeele
Daniel A. wrote in post #968711: > Hello everyone! I've a question that I hope someone in here would be > able to > answer. Today I was writing a simple test for a method that takes the > last > "n" (where n is an integer) users that signed up on my web app. > > I know it's a simple method, but the

[Rails] Re: Mysql query optimization for order condition

2010-12-15 Thread Marnen Laibow-Koser
Pleaee quote when replying Daniel A. wrote in post #968730: > Thanks Marnen. > > I think the times are only related to the time taken to execute the SQL > query, not to put that in memory and then sort the array. You're right that the times don't include in-memory sorting. But on reflection, th

[Rails] Re: Mysql query optimization for order condition

2010-12-15 Thread Daniel Salmer?n Amselem
Thanks Marnen. I think the times are only related to the time taken to execute the SQL query, not to put that in memory and then sort the array. In the first case, I'm curious about how MySQL can sort all the elements so fast. I've read (http://www.igvita.com/2009/03/26/ruby-algorithms-sortin

[Rails] Re: Mysql query optimization for order condition

2010-12-15 Thread Marnen Laibow-Koser
Daniel A. wrote in post #968711: > Hello everyone! I've a question that I hope someone in here would be > able to > answer. Today I was writing a simple test for a method that takes the > last > "n" (where n is an integer) users that signed up on my web app. > > I know it's a simple method, but the

[Rails] Re: mysql e rails won't work!

2010-10-16 Thread Jon W.
im having the same issue. i forgot to run the "dk.rb install" for the DevKit but now that I try, the dk.rb is complaining to me it cant find the config.yml (in some unknown location) . Frederick Cheung wrote in post #943745: > On Sep 24, 11:05 pm, CaViCcHi wrote: > >> C:/Ruby192/lib/ruby/1

[Rails] Re: MySQL setup question

2010-10-04 Thread Daniel Amsterdam
The socket is ok, i use the socket in php and it works. I didn't put the gem in the gem list (i didn't know i had to do that so thank you for that) but when i put the gem in the list i get the error: rake db:migrate (in /sites/mysqlapp) rake aborted! undefined method `init' for Mysql:Class The ge

Re: [Rails] Re: MySQL setup question

2010-10-03 Thread radhames brito
> // files created > > daniels-macbook:blog daniel$ rake db:migrate > > (in /sites/blog) > > rake aborted! > > !!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql', > > '2.8.1' > > > > (See full trace by running task with --trace) > > - > > > > The mysql 2.8.1 is alread

[Rails] Re: MySQL setup question

2010-10-03 Thread sunny
A shot in the dark, is the socket location correct? Try entering into mysql via command link using that socket. -sunny http://ezror.com On Oct 2, 4:23 am, Daniel Amsterdam wrote: > Hello, > > I'm new to ror and i really like it so far! for a new application i > would like to setup a ror applicat

[Rails] Re: mysql e rails... won't work!

2010-09-25 Thread Frederick Cheung
On Sep 24, 11:05 pm, CaViCcHi wrote: > C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed > to generate an executable file. (RuntimeError) > > You have to install development tools first. Here's your hint. Do you have the ming32 toolset installed? Fred -- You received th

[Rails] Re: mysql install problems, please help

2010-09-24 Thread Frederick Cheung
On Sep 24, 1:33 am, Fifofafofi Maza wrote: > I can't install mysql on ruby? please help me>ruby ./install.rb > > http://ipicture.ru/uploads/100924/MWup72534z.jpg > > >rake db:migrate > > http://ipicture.ru/uploads/100924/x2TmxW5Z4s.jpg > -- That looks like you've got an old version of rails

[Rails] Re: mysql port info

2010-09-22 Thread Awijeet Mr.
Marnen Laibow-Koser wrote: > Awijeet Mr. wrote: >> Veera Sundaravel wrote: >>> Awijeet Mr. wrote: I want to create an API for my web application so i need access on mysql. for that I need following info... database host-name and that I am unable to get...

[Rails] Re: mysql gem install error on Mac OS X - 'ulong' undeclared error

2010-09-22 Thread Amol Neurgaonkar
Philip Hallstrom wrote: >> I can't seem to install the mysql gem for Ruby (see errors below). I get an >> 'ulong' undeclared error. Can anyone assist? > > Hopefully this will help... > > http://jlaine.net/2006/10/3/installing-ruby-mysql-driver-on-os-x > > (read through the comments as well) I h

[Rails] Re: mysql port info

2010-09-22 Thread Marnen Laibow-Koser
Awijeet Mr. wrote: > Veera Sundaravel wrote: >> Awijeet Mr. wrote: >>> I want to create an API for my web application so i need access on >>> mysql. >>> for that I need following info... >>> >>> database host-name and that I am unable to get... >>> >>> >>> Thanks >> >> you can simply use local

[Rails] Re: mysql port info

2010-09-22 Thread Awijeet Mr.
Veera Sundaravel wrote: > Awijeet Mr. wrote: >> I want to create an API for my web application so i need access on >> mysql. >> for that I need following info... >> >> database host-name and that I am unable to get... >> >> >> Thanks > > you can simply use localhost as your host-name. And if y

[Rails] Re: mysql port info

2010-09-21 Thread Veera Sundaravel
Awijeet Mr. wrote: > I want to create an API for my web application so i need access on > mysql. > for that I need following info... > > database host-name and that I am unable to get... > > > Thanks you can simply use localhost as your host-name. And if you have login-details to ur mysql ser

[Rails] Re: MYSQL Result Hash Problem

2010-08-23 Thread Sudheendra Panganamala
Michael Pavling wrote: > On 23 August 2010 08:28, Sudheendra Panganamala > wrote: >> Hi, >> >> Is there any way to iterate through MySQL Result Hash multiple times ? >> >> Current Problem: After One iteration, second iteration no records. > > > If you post the code you're having a problem with,

Re: [Rails] Re: MySQL index question

2010-07-20 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > On Jul 20, 3:55 pm, "Jeffrey L. Taylor" wrote: > > > > mysql> EXPLAIN EXTENDED SELECT * FROM tokens WHERE 6813946236211560448 <= > > fnv AND fnv < 6818449835838930944 AND updated_at<'2010-06-20 14:08:55' AND > > occurrences=0; > > ++-++---

[Rails] Re: MySQL index question

2010-07-20 Thread Frederick Cheung
On Jul 20, 3:55 pm, "Jeffrey L. Taylor" wrote: > > mysql> EXPLAIN EXTENDED SELECT * FROM tokens WHERE 6813946236211560448 <= fnv > AND fnv < 6818449835838930944 AND updated_at<'2010-06-20 14:08:55' AND > occurrences=0; > ++-++---+--

Re: [Rails] Re: MySQL index question

2010-07-20 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On Jul 20, 3:12 pm, "Jeffrey L. Taylor" wrote: > > I am trying to speed up some DB operations and perhaps have gone overboard > > with indexes.  Does MySQL usually use only one index per query and simply > > match keys on the results of the indexed first part?  F

[Rails] Re: MySQL index question

2010-07-20 Thread Frederick Cheung
On Jul 20, 3:12 pm, "Jeffrey L. Taylor" wrote: > I am trying to speed up some DB operations and perhaps have gone overboard > with indexes.  Does MySQL usually use only one index per query and simply > match keys on the results of the indexed first part?  For example: one one index will be used

[Rails] Re: MySQL - How to “SUM” in a :has_many case

2010-07-07 Thread Robert Walker
Tom Ha wrote: > Hi there, > > I have the following tables... > > User :has_many Purchases > Item :has_many Purchases > > > ...where Item has a column "amount" (can be + or -) and I need to find > all Users that have a positive SUM of "amounts" (over all Purchases each > one has made). > >

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-07-06 Thread Ram
Hello Marnen, On the contrary, I find hivelogic's logic (:P) quite sound. I understand that the possibility of software updates breaking the environment is kinda remote, but learning to build from source and knowing exactly where your software is helps a lot. Whats the point in developing in RoR

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-07-06 Thread Marnen Laibow-Koser
Ram wrote: > Okay ... RESOLVED! :D > > I left the mysql installation as such in /usr/local . > I had been running the ruby and rails shipped with leopard in /usr/ > bin. > Followed the hivelogic article (http://hivelogic.com/articles/ruby- > rails-leopard) to roll my own installations in /usr/loca

Re: [Rails] Re: mysql gem migrate "Unknown database '[db_development]" error

2010-07-06 Thread Jatin kumar
I am not sure of why this error is coming, but just for a moment, try rake db:create before doing rake db:migrate. It might solve your problem. On Wed, Jul 7, 2010 at 12:22 AM, Oren Golan wrote: > I had this issue after upgrading from ubuntu 9.10 (karmic) to 10.4 > (lucid). > the solution was to

[Rails] Re: mysql gem migrate "Unknown database '[db_development]" error

2010-07-06 Thread Oren Golan
I had this issue after upgrading from ubuntu 9.10 (karmic) to 10.4 (lucid). the solution was to libmysqlclient16-dev: sudo aptitude install libmysqlclient16-dev -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails] Re: mysql gem recognized by script/server but not rake

2010-07-05 Thread Ram
Hi Fred, I actually checked that. Ran "gem list rake" and it listed 0.8.7 . I also ran "gem update rake" but there were no updates to be made. But now I uninstalled rake and then installed it again and its working now :). Weird. Thanks for your response! Cheers, Vinay. On Jul 4, 10:02 pm, Fred

[Rails] Re: mysql gem recognized by script/server but not rake

2010-07-04 Thread Frederick Cheung
On Jul 4, 11:03 am, Ram wrote: > Hi all, > > I recently installed the ruby mysql gem (2.8.1) on my Mac Leopard > after much trouble (http://groups.google.com/group/rubyonrails-talk/ > browse_thread/thread/586c29ca813cd391/fb5f34c8f9eb9e3f?lnk=gst&q=mysql > +gem#fb5f34c8f9eb9e3f) > > Now, when I

[Rails] Re: MySQL not Connected ...... *pull hair*

2010-07-03 Thread Victor S
Also as someone mentioned already. You want to keep an eye on the mysqlserver socket... But if your just working on local to develop screw mysql use sqlite3 and just use mysql on production... Which hopefully is not an iis server... On Jul 2, 11:42 am, Dave Digital wrote: > I'm trying to run " ra

[Rails] Re: MySQL not Connected ...... *pull hair*

2010-07-03 Thread Victor S
Sure get a Mac ;) No but seriously first there's no reason why your app should be in the www folder the only thing you want to expose to the world is he public folder and you can do that by simlinking I don't know what the equivalent is on windows well I don't know why anyone does web dev on a no

[Rails] Re: "MySQL server has gone away"

2010-07-03 Thread j_l_
Did you check mysql config on server? On Jun 30, 5:12 am, fischer1121 wrote: > Hi all, > > I am getting the following error in the middle of a long-running > process: "Mysql::Error: Lost connection to MySQL server during > query:..." > When rescued and retried, it throws the next error: "Mysql::E

Re: [Rails] Re: MySQL not Connected ...... *pull hair*

2010-07-02 Thread Rob Biedenharn
On Jul 2, 2010, at 12:14 PM, DK wrote: Hi - Here are some ideas - at least will be a start at isolating the problem. I am on a Mac so things might not be exact. 1) Here is an example of working database.yml which is working with mysql. You may want to track down the differences and if they

Re: [Rails] Re: MySQL not Connected ...... *pull hair*

2010-07-02 Thread DK
Hi - Here are some ideas - at least will be a start at isolating the problem. I am on a Mac so things might not be exact. 1) Here is an example of working database.yml which is working with mysql. You may want to track down the differences and if they are meaningful. Also, if you have not done, c

[Rails] Re: MySQL not Connected ...... *pull hair*

2010-07-02 Thread Dave Digital
I'm running on Vista 32bit (VMware Fusion). I installed MySQL with WAMP. Yes the mysql service is running. database.yml development: adapter: mysql database: music_library_development pool: 5 timeout: 5000 host:

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-28 Thread Ram
Okay ... RESOLVED! :D I left the mysql installation as such in /usr/local . I had been running the ruby and rails shipped with leopard in /usr/ bin. Followed the hivelogic article (http://hivelogic.com/articles/ruby- rails-leopard) to roll my own installations in /usr/local/ and then ran "sudo gem

[Rails] Re: Mysql::Error (Can't connect to MySQL server on )

2010-06-23 Thread regnever
I had mysql connection error on a production machine. The problem wascaused by incorrect location or missing mysql.sock file. Maybe you have the same issue. On Jun 23, 6:05 pm, Anonuser Anon wrote: > got this error during production (production log) > Mysql::Error (Can't connect to MySQL server o

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
:) I do. And no, not a dumb question. Im happy answering *any* question if it means you can help me fix this hair-loss-causing issue!!! On Jun 17, 5:21 pm, Frederick Cheung wrote: > On Jun 17, 9:58 am, Ram wrote: > > > Hello Fred, > > > I can see the following errors in the mkmf.log residing in

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Frederick Cheung
On Jun 17, 9:58 am, Ram wrote: > Hello Fred, > > I can see the following errors in the mkmf.log residing in ../ > mysql-2.8.1/ext/mysql_api/ . > dumb question: do you have the apple developer tools installed? Fred > 1. (Under "find_library: checking for mysql_query() in - > lmysqlclient... ---

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
Hello Fred, I can see the following errors in the mkmf.log residing in ../ mysql-2.8.1/ext/mysql_api/ . 1. (Under "find_library: checking for mysql_query() in - lmysqlclient... no") conftest.c: In function 't': conftest.c:3: error: 'mysql_query' undeclared (first use in this

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Frederick Cheung
On Jun 16, 12:07 pm, Ram wrote: > :S > > Im not comfortable uninstalling everything and installing it from > scratch again. Dont want to lose my existing setup. Pointers from > anyone at all? > There should be a log file detailing what went wrong when it tried to build the gem. What's in it?

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
Im not re-installing the mysql gem. I have been using the Ruby based mysql library that used to ship with Rails by default (pre 2.2). If I am to migrate to Rails 2.3 then I HAVE to install the gem now. On Jun 16, 8:58 pm, Hassan Schroeder wrote: > On Tue, Jun 15, 2010 at 1:41 AM, Ram wrote: > >

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
:S Im not comfortable uninstalling everything and installing it from scratch again. Dont want to lose my existing setup. Pointers from anyone at all? On Jun 15, 1:52 pm, Ram wrote: > I also get this warning in the very beginning of the gem install. Does > it have any relevance? > > WARNING:  In

[Rails] Re: MySQL Installation Issues

2010-06-15 Thread Jonny Huuan
Mike Montagne wrote: > Abraham Tio wrote: >>> cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 >>> gem install mysql -- >>> --with-mysql-config=/usr/local/mysql/bin/mysql_config >>> Greg Donald >>> http://destiney.com/ >> >> YUP. this works. > > newbie question... > > I was able to get an error f

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-15 Thread Ram
I also get this warning in the very beginning of the gem install. Does it have any relevance? WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/Ram/.gem/ruby/1.8/bin in your PATH, gem executables will

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Tushar Gandhi
Thanks Guys, I have solved the error by installing the mysql 64 bit version and installing the gem. Thanks for your suggestions. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Tushar Gandhi
Hi, How can I found that my ruby application is 32 bit or 64 bit? My ruby version is as follows:- ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] Thanks, Tushar -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Chris Sass
I had a really hard time getting the mysql gem to run on snow leopard for me. Try uninstalling mysql and reinstalling it with macports. Here is a post I made about how I got it to run on my machine. http://lupinedev.com/2010/5/24/installing-mysql-gem-on-snow-leopard Hope this helps... -- Pos

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Frederick Cheung
On Jun 2, 2:04 pm, Tushar Gandhi wrote: > Hi, > No it's 32-bit OS 10.6.x has (by default on most machines) a 32bit kernel, but apps can be 64bit. In particular the ruby runtime is 64/32bit universal and so will default to 64bit. (you should make sure you have the 64bit version of mysql too) Fr

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Tushar Gandhi
Hi, No it's 32-bit OS -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyon

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Marnen Laibow-Koser
Tushar Gandhi wrote: > Hi, > I have MAC OS version 10.6.2. Isn't that 64-bit? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Tushar Gandhi
Hi, I have MAC OS version 10.6.2. Frederick Cheung wrote: > On Jun 2, 12:55�pm, Tushar Gandhi wrote: >> HI, >> I have MAC operating system which is 32 bit. I am facing a problem while >> installing the mysql driver. >> I have installed mysql gem with following command:- >> "sudo env ARCHFLAGS="-ar

[Rails] Re: mysql driver giving problem on MAC 32 Bit

2010-06-02 Thread Frederick Cheung
On Jun 2, 12:55 pm, Tushar Gandhi wrote: > HI, > I have MAC operating system which is 32 bit. I am facing a problem while > installing the mysql driver. > I have installed mysql gem with following command:- > "sudo env ARCHFLAGS="-arch i386" gem install mysql -v=2.7   -- > --with-mysql-config=/u

[Rails] Re: MySQL Constraints - Active Record

2010-05-06 Thread Ho-Sheng Hsiao
Try my fork, sparkfly-foreigner. I had added a much more comprehensive rspec suite to make sure it does what it says it does. http://github.com/sparkfly/foreigner Ho-Sheng Hsiao http://hosheng.blogspot.com/ http://ruby-lambda.blogspot.com/ On May 5, 1:16 pm, Marnen Laibow-Koser wrote: > >> Sugg

[Rails] Re: MySQL Constraints - Active Record

2010-05-05 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: > dev wrote: >> What is the "proper" way to add constraints using MySQL as the >> database? I have it set up like this: >> >> t.integer :product_id, :null => false, :options=> "CONSTRAINT >> fk_line_item_products REFERENCES products(id)" >> >> This does nothing even

  1   2   3   4   5   >