Hi there! I am PHP developer and trying to learn ROR. Currently I am building my first Rails website (OS X Snow Leopard, TextMate) and decided to switch from sqlite to mysql. After many-many hours of searching the internet I managed to install mysql gem. Now I get this error when I try to run rake migrations: rake aborted! Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB I read somewhere that new latest Rails doesn''t work with mysql properly and I have to reinstall mysql etc etc. I am seriously tired of this, it just doesn''t make any sense. I can set up Apache+PHP+MySQL environment literary in minutes, why Rails +MySQL takes days?? Is there a safe stack of Ruby+Rails+MySQL that I can just install and concentrate on web development?
On Nov 3, 10:02 pm, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi there! > > I am PHP developer and trying to learn ROR. Currently I am building my > first Rails website (OS X Snow Leopard, TextMate) and decided to > switch from sqlite to mysql. After many-many hours of searching the > internet I managed to install mysql gem. Now I get this error when I > try to run rake migrations: > > rake aborted! > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > (`version` varchar(255) NOT NULL) ENGINE=InnoDB > > I read somewhere that new latest Rails doesn''t work with mysql > properly and I have to reinstall mysql etc etc. >What''s in your database.yml ? If you cd to your app and run ruby script/dbconsole then rails will open up a mysql console using the connection parameters from your database.yml file, if that doesn''t work then there''s definitely something wrong with that configuration file.> I am seriously tired of this, it just doesn''t make any sense. I can > set up Apache+PHP+MySQL environment literary in minutes, why Rails > +MySQL takes days??Because you''re new to rails. I can set up rails and mysql pretty damn quick but it would probably take me way longer to set up php & mysql or some java based framework, but that''s just to be expected given the tools I know. Fred> Is there a safe stack of Ruby+Rails+MySQL that I > can just install and concentrate on web development?
I''ve recently faced the same problem. What I understood from the pages I visited from google was that the rails 2.3.3 which I had installed on my windows xp machine didn''t work properly with the mysql driver (libmysql.dll). I had to download a different version and add it in c:\ruby\bin I will be able to get more information in some 3 more hours when I will be in office where I experienced this error Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life." On Wed, Nov 4, 2009 at 3:40 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > On Nov 3, 10:02 pm, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi there! > > > > I am PHP developer and trying to learn ROR. Currently I am building my > > first Rails website (OS X Snow Leopard, TextMate) and decided to > > switch from sqlite to mysql. After many-many hours of searching the > > internet I managed to install mysql gem. Now I get this error when I > > try to run rake migrations: > > > > rake aborted! > > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > > (`version` varchar(255) NOT NULL) ENGINE=InnoDB > > > > I read somewhere that new latest Rails doesn''t work with mysql > > properly and I have to reinstall mysql etc etc. > > > > What''s in your database.yml ? If you cd to your app and run > > ruby script/dbconsole > > then rails will open up a mysql console using the connection > parameters from your database.yml file, if that doesn''t work then > there''s definitely something wrong with that configuration file. > > > I am seriously tired of this, it just doesn''t make any sense. I can > > set up Apache+PHP+MySQL environment literary in minutes, why Rails > > +MySQL takes days?? > > Because you''re new to rails. I can set up rails and mysql pretty damn > quick but it would probably take me way longer to set up php & mysql > or some java based framework, but that''s just to be expected given the > tools I know. > > Fred > > Is there a safe stack of Ruby+Rails+MySQL that I > > can just install and concentrate on web development? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Fred, thanks for you reply. My database.yml: development: adapter: mysql encoding: utf8 database: dom pool: 5 username: my_username password: my_password socket: /tmp/mysql.sock (same settings both for test and production environments just for now) if I run ruby script/dbconsole I get this error: Couldn''t find database client: mysql, mysql5. Check your $PATH and try again. Also if I run rake db:create it creates a database without any problems, but any rake db:migrate raises an exception: Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB> Because you''re new to rails. I can set up rails and mysql pretty damn > quick but it would probably take me way longer to set up php & mysql > or some java based framework, but that''s just to be expected given the > tools I know.The thing is - it seems there is no definite tutorial for ROR+MySQL, I followed one to install ROR, then another to get mysql, then another to install mysql gem and now I am stuck, because it just doesn''t work. I am not a unix-master, I don''t want to compile some obscure versions of mysql, then move all the files around, compile gems, then remove this, install that... Peter
Hi Dhruva, thanks for your reply. This is exactly what I am talking about. The problem is, that this recommendation to copy mysql dll file won''t work on OS X. That''s why I am stuck. I followed Rails tutorials to install mysql gem and now it turns out that Rails doesn''t work with it''s own gem. Peter
On Nov 4, 12:58 am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Dhruva, thanks for your reply. > > This is exactly what I am talking about. The problem is, that this > recommendation to copy mysql dll file won''t work on OS X. That''s why I > am stuck. I followed Rails tutorials to install mysql gem and now it > turns out that Rails doesn''t work with it''s own gem. >what version of mysql did you install ? Fred
Zovar wrote: [...]> The thing is - it seems there is no definite tutorial for ROR+MySQL,There are lots. (But you shoul really be using PostgreSQL anyway -- it''s a much better DB.)> I > followed one to install RORThat could be part of your problem. Did you follow Hivelogic''s guide to installing Rails? If so, you wasted your time. Mac OS developer tools include perfectly usable versions of Ruby, RubyGems, and Rails; the Hivelogic tutorials started at a time when this was not the case. (Their mySQL installation guide seems pretty good, though.)>, then another to get mysql, then another > to install mysql gem and now I am stuck, because it just doesn''t work. > I am not a unix-master, I don''t want to compile some obscure versions > of mysql, then move all the files around, compile gems, then remove > this, install that...You should not have to. However, you will get better help if you don''t whine. :) Also, it is possible to do development in many PHP frameworks without really understanding the system you''re working with. It is perhaps a bit less possible in Rails. On balance, that''s probably a good thing.> > PeterBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
MySQL 5.1.37 On Nov 4, 8:59 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Nov 4, 12:58 am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Dhruva, thanks for your reply. > > > This is exactly what I am talking about. The problem is, that this > > recommendation to copy mysql dll file won''t work on OS X. That''s why I > > am stuck. I followed Rails tutorials to install mysql gem and now it > > turns out that Rails doesn''t work with it''s own gem. > > what version of mysql did you install ? > > Fred
> Also, it is possible to do development in many PHP frameworks without > really understanding the system you''re working with. It is perhaps a > bit less possible in Rails. On balance, that''s probably a good thing.Is it possible to understand the system without even starting to use it? The good thing is that anyone can enable Apache+PHP in OS X, then download and install MySQL and they will just work. The bad thing thing is that if you follow the official tutorial on how to install ROR, then install MySQL and run gem install mysql - it won''t work. That''s the real bad thing. It has nothing to do with PHP frameworks. Peter
Zovar wrote:>> Also, it is possible to do development in many PHP frameworks without >> really understanding the system you''re working with. It is perhaps a >> bit less possible in Rails. On balance, that''s probably a good thing. > > Is it possible to understand the system without even starting to use > it?By "system", I meant the OS, not the app framework.> The good thing is that anyone can enable Apache+PHP in OS X, then > download and install MySQL and they will just work. The bad thing > thing is that if you follow the official tutorial on how to install > ROR, then install MySQL and run gem install mysql - it won''t work. > That''s the real bad thing.The official site says that ROR is installed by default on Mac OS. MySQL installs the same way regardless of whether you''re using PHP or Ruby. So that leaves the mysql gem, which does just work. Your case is apparently not typical -- the "install mySQL, install mysql gem, go" works for nearly everyone.> It has nothing to do with PHP frameworks.Nor with Rails. Sounds like your particular setup.> > > PeterBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
On Nov 4, 11:37 am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> MySQL 5.1.37 >I think most people are still running 5.0.x Fred> On Nov 4, 8:59 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > On Nov 4, 12:58 am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Dhruva, thanks for your reply. > > > > This is exactly what I am talking about. The problem is, that this > > > recommendation to copy mysql dll file won''t work on OS X. That''s why I > > > am stuck. I followed Rails tutorials to install mysql gem and now it > > > turns out that Rails doesn''t work with it''s own gem. > > > what version of mysql did you install ? > > > Fred
Frederick Cheung wrote:> On Nov 4, 11:37�am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> MySQL 5.1.37 >> > I think most people are still running 5.0.x > > FredReally? I think I''ve used 5.1 both with PHP and Rails (although I no longer have access to those boxes, so I can''t verify that). Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Zovar - what do you have for versions? For example, here''s what I''ve got: OS X => 10.5.8 PowerPC G4 mysql --version => mysql Ver 14.14 Distrib 5.1.39, for apple-darwin9.5.0 (powerpc) using readline 5.1 ruby --version => ruby 1.8.7 (2009-06-08 patchlevel 173) [powerpc-darwin9.7.0] ruby 1.9.1p243 (2009-07-16 revision 24175) [powerpc-darwin9.8.0] ruby 1.9.2dev (2009-10-18 trunk 25393) [powerpc-darwin9.8.0] rails --version => Rails 2.3.4 Rails 3.0.pre (with ruby 1.9.2dev only) gem list mysql => mysql (2.8.1) With this configuration all rails 2.3.4 activerecord tests on mysql db pass. You''ll notice that I''m running old hardware (ppc) and OS (leopard sans snow). Don''t loose heart - I expect we can get you up and running. On Nov 4, 10:44 am, Marnen Laibow-Koser <rails-mailing-l...@andreas- s.net> wrote:> Frederick Cheung wrote: > > On Nov 4, 11:37 am, Zovar <peter.zavor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> MySQL 5.1.37 > > > I think most people are still running 5.0.x > > > Fred > > Really? I think I''ve used 5.1 both with PHP and Rails (although I no > longer have access to those boxes, so I can''t verify that). > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.